/* ========================================
   MetricHarbor Theme System
   
   Modular CSS Architecture:
   - variables.css: Design tokens & color palette
   - layout.css: Sidebar, main wrapper, grid system
   - components.css: Buttons, badges, cards, alerts
   - forms.css: Form controls, inputs, validation
   - tables.css: Table styling, empty states
   - admin.css: Admin panel specific styles
   ======================================== */

/* 1. Import shared utilities and vendor styles */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

/* 2. Design System */
@import 'variables.css';

/* 3. Core Layout */
@import 'layout.css';

/* 4. Components */
@import 'components.css';

/* 5. Forms & Inputs */
@import 'forms.css';

/* 6. Tables & Lists */
@import 'tables.css';

/* 7. Admin Specific */
@import 'admin.css';

/* ========================================
   Authentication Pages
   ======================================== */

.auth-page {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-bg);
}

.login-page,
.register-page {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-bg);
}

.login-container,
.register-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card,
.register-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(20, 184, 166, 0.1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-header,
.register-header {
    text-align: center;
    padding: 30px 20px 20px;
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
}

.login-logo,
.register-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 8px;
}

.login-title,
.register-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.login-subtitle,
.register-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.login-body,
.register-body {
    padding: 30px 20px;
}

.form-group {
    margin-bottom: 16px;
}

/* ========================================
   Common Styles
   ======================================== */

.text-muted {
    color: var(--text-secondary) !important;
}

.text-danger {
    color: var(--metric-errors) !important;
}

.text-success {
    color: var(--metric-healthy) !important;
}

.text-info {
    color: var(--metric-cpu) !important;
}

.text-primary {
    color: var(--brand-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-break {
    word-break: break-word;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* Font Weight */
.font-weight-bold {
    font-weight: 700;
}

.font-weight-normal {
    font-weight: 400;
}

.font-monospace {
    font-family: 'Courier New', Courier, monospace;
}

/* Display Utilities */
.d-block {
    display: block;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

.d-none {
    display: none;
}

.d-grid {
    display: grid;
}

.w-100 {
    width: 100%;
}

.w-75 {
    width: 75%;
}

.w-50 {
    width: 50%;
}

.w-25 {
    width: 25%;
}

.h-100 {
    height: 100%;
}

/* Spacing */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 16px !important; }

/* Opacity */
.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

.cursor-default {
    cursor: default;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }

    .main-wrapper {
        margin-left: 200px;
    }

    .col-lg-4,
    .col-lg-6,
    .col-lg-8 {
        flex: 0 0 100%;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .sidebar {
        display: none;
    }

    .main-wrapper {
        margin-left: 0;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .login-container,
    .register-container {
        padding: 10px;
    }
}

/* ========================================
   Accessibility
   ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 2px;
}
