/* ============================================
   AploCloud Design System — Aplosoft Style
   Clean, light, modern corporate aesthetic
   Font: Onest | Theme: Light
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
    /* Backgrounds */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7F8FA;
    --bg-card: #FFFFFF;
    --bg-hover: #F0F2F5;
    --bg-input: #F7F8FA;
    --bg-overlay: rgba(15, 23, 42, 0.5);

    /* Text */
    --text-primary: #0F1729;
    --text-secondary: #5A6275;
    --text-muted: #9CA3B0;
    --text-inverse: #FFFFFF;

    /* Accent */
    --accent: #3B5FE5;
    --accent-hover: #2D4FD6;
    --accent-light: rgba(59, 95, 229, 0.08);
    --accent-glow: rgba(59, 95, 229, 0.15);

    /* Module accent colors — softer pastels for backgrounds */
    --color-green: #22C55E;
    --color-green-light: rgba(34, 197, 94, 0.10);
    --color-green-bg: #ECFDF5;
    --color-pink: #EC4899;
    --color-pink-light: rgba(236, 72, 153, 0.10);
    --color-pink-bg: #FDF2F8;
    --color-purple: #8B5CF6;
    --color-purple-light: rgba(139, 92, 246, 0.10);
    --color-purple-bg: #F5F3FF;
    --color-blue: #3B82F6;
    --color-blue-light: rgba(59, 130, 246, 0.10);
    --color-blue-bg: #EFF6FF;
    --color-orange: #F97316;
    --color-orange-light: rgba(249, 115, 22, 0.10);
    --color-orange-bg: #FFF7ED;
    --color-yellow: #EAB308;
    --color-yellow-light: rgba(234, 179, 8, 0.10);
    --color-yellow-bg: #FEFCE8;
    --color-red: #EF4444;
    --color-red-light: rgba(239, 68, 68, 0.10);
    --color-red-bg: #FEF2F2;
    --color-teal: #14B8A6;
    --color-teal-light: rgba(20, 184, 166, 0.10);
    --color-teal-bg: #F0FDFA;

    /* Legacy aliases for JS inline styles compatibility */
    --accent-blue: var(--color-blue);
    --accent-green: var(--color-green);
    --accent-red: var(--color-red);
    --accent-orange: var(--color-orange);
    --accent-purple: var(--color-purple);
    --accent-yellow: var(--color-yellow);
    --accent-pink: var(--color-pink);
    --accent-1c: var(--color-yellow);
    --bg-dark: var(--bg-secondary);
    --bg-elevated: var(--bg-card);
    --shadow: var(--shadow-sm);

    /* Borders */
    --border: #E8ECF1;
    --border-hover: #D1D5DB;
    --border-focus: var(--accent);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 16px 40px rgba(15, 23, 42, 0.1);
    --shadow-focus: 0 0 0 3px var(--accent-glow);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transition */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- Base ---- */
body {
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---- Header / Navbar ---- */
.navbar,
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
}

.navbar-content,
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-left,
.header-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---- Page Title ---- */
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ---- Back Button ---- */
.back-btn {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ---- User Info ---- */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-inverse);
}

.user-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ---- Buttons ---- */
.btn-primary {
    padding: 10px 20px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.btn-icon {
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-success {
    padding: 10px 20px;
    background: var(--color-green);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 14px;
}

.btn-success:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.btn-danger {
    padding: 10px 20px;
    background: var(--color-red);
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-inverse);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    font-size: 14px;
}

.btn-danger:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-logout {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition);
    font-family: inherit;
}

.btn-logout:hover {
    border-color: var(--color-red);
    color: var(--color-red);
    background: var(--color-red-light);
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    padding-top: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

/* Colored stat card variants */
.stat-card.stat-blue::before { background: var(--color-blue); }
.stat-card.stat-green::before { background: var(--color-green); }
.stat-card.stat-purple::before { background: var(--color-purple); }
.stat-card.stat-orange::before { background: var(--color-orange); }
.stat-card.stat-red::before { background: var(--color-red); }
.stat-card.stat-teal::before { background: var(--color-teal); }
.stat-card.stat-pink::before { background: var(--color-pink); }
.stat-card.stat-yellow::before { background: var(--color-yellow); }

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* ---- Module Cards (Aplosoft pastel style) ---- */
.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    padding-top: 28px;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--module-color, var(--accent));
}

.module-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.module-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.module-card.locked:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.module-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 22px;
}

.module-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.module-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.module-lock {
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ---- Grids ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ---- Sections ---- */
.modules-section {
    margin-bottom: 36px;
}

.section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ---- Dashboard Layout ---- */
.dashboard {
    min-height: 100vh;
}

.dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 30px;
}

.dashboard-header {
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ---- Main Content ---- */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 30px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-focus);
    background: var(--bg-primary);
}

/* -- Custom Select (modern dropdown) -- */
.form-select,
.filter-select,
.integration-select,
select.form-input {
    width: 100%;
    padding: 10px 38px 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition);
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3B0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.form-select:focus,
.filter-select:focus,
.integration-select:focus,
select.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-focus);
    background-color: var(--bg-primary);
}

.form-select:hover,
.filter-select:hover,
.integration-select:hover,
select.form-input:hover {
    border-color: var(--border-hover);
}

/* Remove default arrow in IE */
.form-select::-ms-expand,
.filter-select::-ms-expand,
.integration-select::-ms-expand,
select.form-input::-ms-expand {
    display: none;
}

/* Disabled state */
.form-select:disabled,
.filter-select:disabled,
.integration-select:disabled,
select.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-secondary);
}

/* Option styling (limited browser support but helps) */
.form-select option,
.filter-select option,
.integration-select option,
select.form-input option {
    padding: 8px 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ---- Tables ---- */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Universal table styles — work for any table inside .table-container
   and for any named table class (.data-table, .user-table, .history-table, .table) */
.table-container table,
.data-table,
.user-table,
.history-table,
table.table {
    width: 100%;
    border-collapse: collapse;
}

.table-container table thead,
.data-table thead,
.user-table thead,
.history-table thead,
table.table thead {
    background: var(--bg-secondary);
}

.table-container table th,
.data-table th,
.user-table th,
.history-table th,
table.table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-container table td,
.data-table td,
.user-table td,
.history-table td,
table.table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table-container table tbody tr,
.data-table tbody tr,
.user-table tbody tr,
.history-table tbody tr,
table.table tbody tr {
    transition: background var(--transition);
}

.table-container table tbody tr:hover,
.data-table tbody tr:hover,
.user-table tbody tr:hover,
.history-table tbody tr:hover,
table.table tbody tr:hover {
    background: var(--bg-hover);
}

.table-container table tbody tr:last-child td,
.data-table tbody tr:last-child td,
.user-table tbody tr:last-child td,
.history-table tbody tr:last-child td,
table.table tbody tr:last-child td {
    border-bottom: none;
}

/* Table responsive overflow */
.table-container {
    overflow-x: auto;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.badge-success {
    background: var(--color-green-light);
    color: var(--color-green);
}

.badge-error,
.badge-danger {
    background: var(--color-red-light);
    color: var(--color-red);
}

.badge-info {
    background: var(--color-blue-light);
    color: var(--color-blue);
}

.badge-warning {
    background: var(--color-orange-light);
    color: var(--color-orange);
}

.badge-purple {
    background: var(--color-purple-light);
    color: var(--color-purple);
}

/* ---- Modals ---- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.2s ease;
}

.modal-header {
    padding: 24px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 20px;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--color-green-light);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-error {
    background: var(--color-red-light);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-info {
    background: var(--color-blue-light);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-warning {
    background: var(--color-orange-light);
    color: #d97706;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ---- Error Message (Login) ---- */
.error-message {
    background: var(--color-red-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ---- Login ---- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
}

.login-logo {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

/* ---- Loading ---- */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    flex-direction: column;
    gap: 16px;
    background: var(--bg-secondary);
}

.loading-text {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ---- Toolbar / Filters ---- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-focus);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* .filter-select — styled in unified select block above */

/* ---- Tabs ---- */
.tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 3px;
    border: 1px solid var(--border);
}

.tab {
    padding: 8px 18px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.pagination-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

/* ---- Tooltip ---- */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: var(--text-primary);
    color: var(--text-inverse);
    border-radius: var(--radius-sm);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.tooltip:hover::after {
    opacity: 1;
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .navbar-content,
    .header-content {
        padding: 0 16px;
    }

    .dashboard-content,
    .main-content {
        padding: 20px 16px;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .user-info {
        display: none;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .toolbar {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .modal {
        max-width: 100%;
        margin: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 32px 24px;
    }
}
