/* ==========================================================================
   Modern Design System & Styling for MVC Project
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-border: #c7d2fe;

    --secondary: #64748b;
    --secondary-hover: #475569;
    --secondary-light: #f1f5f9;

    --success: #10b981;
    --success-light: #ecfdf5;
    --success-border: #a7f3d0;

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: #fef2f2;
    --danger-border: #fecaca;

    --warning: #f59e0b;
    --warning-light: #fffbeb;

    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    --bg-sidebar-hover: #1e293b;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    --border-color: #e2e8f0;
    --border-color-dark: #334155;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);

    --font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   Authentication Views Layout
   ========================================================================== */

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #eff6ff 0%, #f8fafc 90%);
    padding: 1.5rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #818cf8 100%);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 1rem;
}

.auth-logo-emblem {
    width: 90px;
    height: 90px;
    border-radius: 20px;
    background: #ffffff;
    padding: 6px;
    margin: 0 auto 1.25rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.auth-logo-emblem:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -4px rgba(79, 70, 229, 0.22);
}

.auth-emblem-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-demo-hint {
    margin-top: 1.75rem;
    padding: 1rem;
    background: var(--primary-light);
    border: 1px dashed var(--primary-border);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.hint-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.hint-credentials {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hint-credentials code {
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--primary);
}

/* ==========================================================================
   Dashboard Shell Layout
   ========================================================================== */

.dashboard-body {
    min-height: 100vh;
    display: flex;
}

.layout-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: #f1f5f9;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color-dark);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.25;
    width: 100%;
}

.brand-logo-img-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #ffffff;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover .brand-logo-img-wrapper {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-titles {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.brand-subname {
    font-size: 0.7rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition);
}

.nav-item:hover {
    color: #fff;
    background: var(--bg-sidebar-hover);
}

.nav-item.active {
    color: #fff;
    background: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: #94a3b8;
}

.logout-btn {
    color: #94a3b8;
    background: transparent;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.logout-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* Main Wrapper */
.main-wrapper {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    width: 100%;
}

/* Topbar */
.topbar {
    height: 70px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.topbar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.session-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--secondary-light);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 0 2px var(--success-border);
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
}

.btn-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn-profile-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-logout-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Page Content */
.page-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    min-width: 0;
}

.footer {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    background: var(--bg-card);
}

/* ==========================================================================
   Components: Cards, Buttons, Inputs, Tables
   ========================================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background: var(--success-light);
    border: 1px solid var(--success-border);
    color: #065f46;
}

.alert-danger {
    background: var(--danger-light);
    border: 1px solid var(--danger-border);
    color: #991b1b;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: #fff;
    border-color: var(--border-color);
    color: var(--text-primary);
}

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

.btn-secondary {
    background: var(--secondary-light);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.form-control.with-icon {
    padding-left: 2.5rem;
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-toggle-pwd:hover {
    color: var(--text-primary);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.required {
    color: var(--danger);
}

.optional {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.8125rem;
}

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

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

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

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

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

.badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
}

.badge-purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.badge-teal {
    background: #ccfbf1;
    color: #0f766e;
}

/* Project Priority Badges */
.badge-priority-high {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca;
    font-weight: 700;
}

.badge-priority-medium {
    background: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a;
    font-weight: 700;
}

.badge-priority-low {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border: 1px solid #bbf7d0;
    font-weight: 700;
}

.badge-sm {
    padding: 0.125rem 0.375rem;
    font-size: 0.6875rem;
}

/* Tables */
.table-card {
    padding: 0;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.table-scroll-hint {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.table-scroll-hint .hint-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.table-scroll-hint .hint-text svg {
    color: var(--primary);
    flex-shrink: 0;
}

.table-scroll-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.table-scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.table-scroll-btn:hover:not(:disabled) {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.table-scroll-btn:disabled,
.table-scroll-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: var(--border-color);
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
    position: relative;
    display: block;
}

.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
    min-width: 820px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    background: #f8fafc;
    padding: 0.875rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    background: #fff;
    white-space: nowrap;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #fcfdfe;
}

.id-cell {
    font-weight: 700;
    color: var(--text-primary);
}

.user-email-text {
    color: var(--text-secondary);
    word-break: break-word;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-cell {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.user-cell-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-cell-name {
    font-weight: 600;
    color: var(--text-primary);
}

.action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-edit {
    color: var(--primary);
}

.btn-edit:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
}

.btn-delete {
    color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger-light);
    border-color: var(--danger-border);
}

.btn-disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    background: var(--secondary-light);
}

.empty-state-row {
    padding: 3rem !important;
    color: var(--text-muted);
}

/* ==========================================================================
   Page Specific Layouts
   ========================================================================== */

.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Header Action Group & View Switcher */
.header-action-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.view-switch-control {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.view-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    font-family: inherit;
}

.view-switch-btn:hover {
    color: var(--text-primary);
}

.view-switch-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.view-switch-btn svg {
    flex-shrink: 0;
}

/* User List / Card View */
.users-list-container {
    width: 100%;
    animation: fadeIn 0.2s ease;
}

.user-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.user-item-card {
    margin-bottom: 0;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.user-item-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-border);
}

.user-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.user-card-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.avatar-large {
    width: 42px;
    height: 42px;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.user-card-title {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-card-name-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.user-card-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.user-card-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.user-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.875rem 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 0.875rem;
}

.user-card-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.user-card-info-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.user-card-info-item .info-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.user-card-info-item .info-value {
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.user-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.user-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-end;
}

.empty-state-card {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state-icon {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Dashboard Specifics */
.dashboard-header-card {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
}

.dashboard-header-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.dashboard-header-card p {
    color: #e0e7ff;
    font-size: 0.9375rem;
}

.dashboard-header-card .badge-primary {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-actions .btn-primary {
    background: #fff;
    color: var(--primary);
}

.header-actions .btn-primary:hover {
    background: #f8fafc;
}

.header-actions .btn-outline {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.header-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.25);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: var(--primary-light);
    color: var(--primary);
}

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

.stat-icon-purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.text-small {
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-online {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--success);
    margin-right: 4px;
}

/* Blank Dashboard Canvas */
.blank-dashboard-card {
    border: 2px dashed var(--border-color);
    background: #ffffff;
    padding: 4rem 2rem;
    text-align: center;
}

.blank-dashboard-content {
    max-width: 460px;
    margin: 0 auto;
}

.blank-icon-box {
    width: 80px;
    height: 80px;
    background: var(--secondary-light);
    color: var(--secondary);
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.blank-dashboard-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.blank-dashboard-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Profile Layout */
.profile-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

.profile-info-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.profile-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.25rem;
}

.profile-badge-row {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

.section-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .table-scroll-hint {
        display: flex;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    body.sidebar-locked {
        overflow: hidden;
    }

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

    .mobile-toggle {
        display: block;
    }

    /* Topbar Header: Mobile Responsive */
    .topbar {
        padding: 0 1rem;
        height: 60px;
        position: sticky;
        top: 0;
        z-index: 50;
    }

    .topbar-title {
        font-size: 1.125rem;
        max-width: 170px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar-right {
        gap: 0.5rem;
    }

    .session-indicator {
        display: none;
    }

    .btn-profile-link span,
    .btn-logout-link span {
        display: none;
    }

    .btn-profile-link,
    .btn-logout-link {
        padding: 0.375rem;
        width: 36px;
        height: 36px;
        justify-content: center;
    }

    .page-content {
        padding: 1rem;
    }

    /* Page Header in User View */
    .page-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.875rem;
    }

    .page-header-row .btn {
        width: 100%;
        justify-content: center;
    }

    /* Header Action Group & Switcher on Mobile */
    .header-action-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
    }

    .view-switch-control {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .view-switch-btn {
        justify-content: center;
        padding: 0.5rem;
        font-size: 0.875rem;
        min-height: 40px;
    }

    /* User Cards Grid Mobile */
    .user-cards-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .user-item-card {
        padding: 1rem;
    }

    .user-card-actions {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }

    .user-card-actions .btn-action {
        flex: 1;
        justify-content: center;
        min-height: 38px;
        padding: 0.45rem 0.75rem;
        font-size: 0.8125rem;
    }

    .user-card-actions form {
        flex: 1;
        display: flex;
    }

    .user-card-actions form .btn-action {
        width: 100%;
    }

    /* Dashboard: Mobile Responsive Header & Body */
    .dashboard-header-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-md);
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .dashboard-header-card h2 {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .dashboard-header-card p {
        font-size: 0.875rem;
    }

    .header-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.625rem;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.625rem 0.75rem;
        font-size: 0.8125rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
        margin-bottom: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
    }

    .stat-value {
        font-size: 1.35rem;
    }

    .stat-value.text-small {
        font-size: 0.875rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .blank-dashboard-card {
        padding: 2.5rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .blank-icon-box {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }

    .blank-dashboard-content h3 {
        font-size: 1.125rem;
    }

    .blank-dashboard-content p {
        font-size: 0.8125rem;
    }

    /* User Table: Mobile Responsive Table with Touch & Button Scroll */
    .table-scroll-hint {
        display: flex;
    }

    .table-card {
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        background: var(--bg-card);
        overflow: hidden;
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }

    .table-responsive {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        display: block;
    }

    .data-table {
        min-width: 820px;
        width: 100%;
        display: table;
        border-collapse: separate;
        border-spacing: 0;
    }

    .data-table thead {
        display: table-header-group;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .data-table tbody {
        display: table-row-group;
    }

    .data-table tr {
        display: table-row;
    }

    .data-table th,
    .data-table td {
        display: table-cell;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

    .data-table td::before {
        display: none;
    }

    .data-table th {
        font-size: 0.6875rem;
        padding: 0.625rem 1rem;
        background: #f8fafc;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 1px solid var(--border-color);
    }

    .btn-action {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }

    /* All Cards: Responsive padding on mobile */
    .card {
        padding: 1.25rem 1rem;
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }

    /* All Forms & User Management Pages */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-card {
        padding: 1.25rem 1rem;
    }

    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents auto-zoom on iOS Safari */
        padding: 0.625rem 0.875rem;
    }

    select.form-control {
        min-height: 44px;
        height: 44px;
        background-color: #fff;
    }

    .form-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .form-actions .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        font-size: 0.9375rem;
    }

    /* User table cell responsiveness */
    .user-cell {
        gap: 0.5rem;
    }

    .avatar-cell {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .user-cell-name {
        font-size: 0.8125rem;
    }

    /* Profile Page: Responsive body */
    .profile-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-info-card {
        padding: 1.5rem 1rem;
    }

    .profile-form-card {
        padding: 1.25rem 1rem;
    }

    .profile-badge-row {
        gap: 0.5rem;
        justify-content: center;
    }

    /* Alerts and Feedback */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }

    /* Footer */
    .footer {
        padding: 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 0.875rem 0.75rem;
    }

    .card {
        padding: 1rem 0.875rem;
    }

    .header-actions {
        grid-template-columns: 1fr;
    }

    /* Auth Views: Login Responsive Body */
    .auth-body {
        padding: 1rem 0.75rem;
    }

    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: var(--radius-md);
    }

    .auth-header {
        margin-bottom: 1.25rem;
    }

    .auth-title {
        font-size: 1.35rem;
    }

    .auth-subtitle {
        font-size: 0.8125rem;
    }

    .auth-demo-hint {
        padding: 0.75rem;
        font-size: 0.75rem;
    }

    .hint-credentials span {
        word-break: break-all;
    }
}

/* ==========================================================================
   Module Master & User Module Permissions Styling
   ========================================================================== */

.btn-perm {
    color: #0284c7;
}

.btn-perm:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
}

/* Module Master Table Elements */
.module-title-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.module-icon-box {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.module-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.module-name-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.module-code-pill {
    font-family: monospace;
    font-size: 0.75rem;
    background: var(--secondary-light);
    color: var(--text-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    width: fit-content;
}

.module-desc-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    max-width: 380px;
}

.module-sub-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.route-code {
    font-family: monospace;
    font-size: 0.8125rem;
    color: #4338ca;
    background: #eef2ff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #c7d2fe;
}

.route-code-sm {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--secondary-light);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
}

/* Status Toggle Button */
.status-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.status-toggle-btn .toggle-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-toggle-btn.is-active {
    background: var(--success-light);
    color: var(--success);
    border-color: var(--success-border);
}

.status-toggle-btn.is-active .toggle-dot {
    background: var(--success);
}

.status-toggle-btn.is-active:hover {
    background: #d1fae5;
}

.status-toggle-btn.is-inactive {
    background: var(--secondary-light);
    color: var(--secondary);
    border-color: var(--border-color);
}

.status-toggle-btn.is-inactive .toggle-dot {
    background: var(--secondary);
}

.status-toggle-btn.is-inactive:hover {
    background: #e2e8f0;
}

/* User Selection Bar */
.user-selection-card {
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.user-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.user-select-label-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.user-select-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.user-select-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.user-select-picker {
    min-width: 320px;
    max-width: 100%;
}

.select-user-dropdown {
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
}

/* User Summary Card */
.user-summary-card {
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.user-summary-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.user-profile-badge-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-large {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
}

.user-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-profile-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-profile-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.user-profile-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Perm Stats Chips */
.perm-stats-grid {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.perm-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    min-width: 90px;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

/* Admin Notice Banner */
.admin-notice-banner {
    margin-top: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-radius: var(--radius-sm);
    color: #1e3a8a;
    font-size: 0.875rem;
}

.admin-notice-banner svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #2563eb;
}

/* Perm Toolbar */
.perm-toolbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.perm-toolbar-presets {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toolbar-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.preset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-outline-danger {
    color: var(--danger);
    border-color: var(--danger-border);
}

.btn-outline-danger:hover {
    background: var(--danger-light);
}

.perm-toolbar-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-perm-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-select {
    min-width: 170px;
    font-size: 0.8125rem;
    padding: 0.35rem 0.65rem;
}

/* Matrix Table */
.matrix-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.matrix-mod-header {
    width: 40%;
    min-width: 250px;
}

.matrix-perm-header {
    width: 12%;
    min-width: 90px;
    text-align: center;
}

.perm-header-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.8125rem;
    font-weight: 700;
}

.perm-header-toggle input[type="checkbox"] {
    cursor: pointer;
}

.matrix-action-header {
    width: 12%;
    min-width: 110px;
    text-align: center;
}

.matrix-mod-cell {
    padding: 0.875rem 1rem !important;
}

.matrix-chk-cell {
    padding: 0.875rem 0.5rem !important;
    text-align: center;
}

.custom-control-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.custom-control-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.btn-row-toggle {
    background: var(--secondary-light);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-row-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-border);
}

.matrix-footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #fafbfc;
    border-top: 1px solid var(--border-color);
}

.btn-save-perm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   Project Master Register & Creation Form Styling (CSMC & ASCDCL)
   ========================================================================== */

.project-register-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding-bottom: 5rem;
}

/* Municipal Portal Header */
.municipal-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
    color: #ffffff;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.municipal-branding {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.municipal-emblem-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.emblem-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.csmc-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border: 1px solid #fbbf24;
}

.ascdcl-badge {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: 1px solid #38bdf8;
}

.emblem-divider {
    width: 2px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
}

.portal-tag {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #38bdf8;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.portal-main-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
}

.portal-subheading {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    max-width: 650px;
}

/* Lookup Status Banners */
.lookup-status-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.spinner-sm {
    width: 18px;
    height: 18px;
    border: 2px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.lookup-error-banner {
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Form Quick Nav Tabs */
.project-form-nav {
    display: flex;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.375rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
    gap: 0.375rem;
}

.form-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.form-nav-link:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.form-nav-link.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.nav-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.6875rem;
    font-weight: 700;
}

.form-nav-link.active .nav-step {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Group Cards */
.form-group-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.form-group-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.07);
}

.group-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    background: #fafbfc;
    border-bottom: 1px solid var(--border-color);
}

.group-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

.group-header-icon.bg-indigo { background: #e0e7ff; color: #4338ca; }
.group-header-icon.bg-emerald { background: #d1fae5; color: #065f46; }
.group-header-icon.bg-amber { background: #fef3c7; color: #92400e; }
.group-header-icon.bg-cyan { background: #cffafe; color: #155e75; }
.group-header-icon.bg-violet { background: #ede9fe; color: #5b21b6; }
.group-header-icon.bg-rose { background: #ffe4e6; color: #9f1239; }

.group-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.group-card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0 0;
}

.group-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    background: var(--secondary-light);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Grids inside Cards */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

/* Input Enhancements */
.label-with-tool {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.label-with-tool .form-label {
    margin-bottom: 0;
}

.input-with-action {
    display: flex;
    position: relative;
}

.input-with-action input {
    padding-right: 2.75rem;
}

.btn-input-action {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-input-action:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.bg-readonly {
    background-color: #f1f5f9 !important;
    cursor: not-allowed;
    color: #475569;
    font-family: monospace;
    font-weight: 600;
}

.input-with-validation {
    position: relative;
}

.field-spinner {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #cbd5e1;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.field-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1.125rem;
}

.field-feedback.text-success { color: #10b981; font-weight: 600; }
.field-feedback.text-danger { color: #ef4444; font-weight: 600; }

.flash {
    animation: highlight 0.6s ease;
}

@keyframes highlight {
    0% { transform: scale(1); background: #38bdf8; }
    50% { transform: scale(1.1); background: #f59e0b; }
    100% { transform: scale(1); }
}

.phone-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.phone-padded {
    padding-left: 2.75rem !important;
}

/* Indian Currency Input Formatting */
.currency-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 0.875rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    pointer-events: none;
}

.currency-field {
    padding-left: 2.25rem !important;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: right;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.currency-words-pill {
    display: inline-block;
    margin-top: 0.375rem;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

/* Financial Variance Warning Alert */
.financial-alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    color: #92400e;
    box-shadow: var(--shadow-sm);
}

.financial-alert-banner .alert-icon {
    flex-shrink: 0;
    color: #d97706;
}

.financial-alert-banner .alert-title {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.financial-alert-banner p {
    font-size: 0.84375rem;
    line-height: 1.45;
    margin: 0;
}

.financial-summary-strip {
    display: flex;
    gap: 2rem;
    margin-top: 1.25rem;
    padding: 0.875rem 1.25rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.summary-metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.metric-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.metric-value {
    font-weight: 700;
    color: var(--text-primary);
}

.metric-value.text-success { color: #059669; }
.metric-value.text-danger { color: #dc2626; }

/* Duration Display Box */
.duration-display-box {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6875rem 1rem;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.duration-icon {
    color: var(--text-muted);
    display: flex;
}

/* Sticky Action Bar */
.form-sticky-action-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    margin-top: 2rem;
}

.action-bar-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-bar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.autosave-status {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.action-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Modal Dialog */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-dialog {
    width: 100%;
    max-width: 480px;
}

.modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: #fafbfc;
    border-top: 1px solid var(--border-color);
}

/* Project Master Table Badges */
.code-badge-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-id-badge {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
}

.ref-code-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.badge-org {
    background: #0f172a;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.5px;
}

.category-pill {
    padding: 0.25rem 0.625rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.currency-amount {
    font-weight: 700;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: center;
}

/* ==========================================================================
   Executive Metrics Strip (Project Master Register & Dashboard)
   ========================================================================== */

.metrics-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.metric-card,
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover,
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    border-color: #cbd5e1;
}

.metric-card::before,
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.2s ease;
}

.metric-card:has(.bg-indigo)::before { background: #6366f1; }
.metric-card:has(.bg-cyan)::before { background: #06b6d4; }
.metric-card:has(.bg-amber)::before { background: #f59e0b; }
.metric-card:has(.bg-emerald)::before { background: #10b981; }

.metric-icon,
.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.metric-card:hover .metric-icon,
.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.metric-icon.bg-indigo,
.stat-icon-blue {
    background: #eef2ff !important;
    color: #4f46e5 !important;
    border: 1px solid #c7d2fe;
}

.metric-icon.bg-cyan {
    background: #ecfeff !important;
    color: #0891b2 !important;
    border: 1px solid #a5f3fc;
}

.metric-icon.bg-amber {
    background: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a;
}

.metric-icon.bg-emerald {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0;
}

.metric-data,
.stat-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.metric-number,
.stat-value {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.metric-title,
.stat-label {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    line-height: 1.3;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
    .metrics-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .municipal-portal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-form-nav {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .metrics-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .form-grid-3, .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .action-bar-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .action-bar-right {
        justify-content: stretch;
    }
    .action-bar-right .btn {
        flex: 1;
    }
}

/* ==========================================================================
   Project Master Record Sheet & Printable Dossier Styling
   ========================================================================== */

.project-print-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    padding-bottom: 4rem;
}

.print-actions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.toolbar-title {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.printable-dossier-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    color: #0f172a;
}

.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    flex-wrap: wrap;
}

.dossier-header-branding {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.dossier-emblems {
    display: flex;
    gap: 0.5rem;
}

.dossier-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 800;
}

.dossier-org-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.2px;
    margin: 0;
    line-height: 1.3;
}

.dossier-corp-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #0284c7;
    margin: 0.15rem 0 0 0;
}

.dossier-system-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 0.35rem;
}

.dossier-meta-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    min-width: 250px;
}

.dossier-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.2rem 0;
}

.meta-label {
    font-weight: 600;
    color: #64748b;
}

.meta-val {
    font-family: monospace;
    font-weight: 700;
    color: #0f172a;
}

.meta-val.highlight {
    color: var(--primary);
}

.status-pill {
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    text-transform: uppercase;
    font-family: sans-serif;
}

.status-pill.confirmed {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-pill.draft {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.dossier-divider {
    height: 3px;
    background: linear-gradient(90deg, #f59e0b 0%, #0284c7 100%);
    margin-bottom: 1.5rem;
    border-radius: 2px;
}

.dossier-section {
    margin-bottom: 1.5rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

.section-title-strip {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.45rem 0.875rem;
    border-radius: 4px;
    margin-bottom: 0.625rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 800;
    border-radius: 4px;
}

.section-title-strip h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.dossier-table-container {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}

.dossier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84375rem;
}

.dossier-table th {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    vertical-align: middle;
}

.dossier-table td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    color: #0f172a;
    vertical-align: middle;
    background: #ffffff;
}

.project-title-highlight {
    font-size: 0.9375rem;
    color: #0f172a;
    background: #fafbfc !important;
}

.dossier-sub-text {
    font-size: 0.75rem;
    color: #64748b;
    font-family: monospace;
}

.pre-wrapped {
    white-space: pre-wrap;
    line-height: 1.5;
}

.financial-table .amount-cell {
    font-size: 1rem;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.amount-words {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 0.15rem;
}

.lifecycle-status-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 700;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

/* Signature Block */
.signature-section {
    margin-top: 2rem;
    break-inside: avoid;
    page-break-inside: avoid;
}

.signature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.signature-box {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 1rem;
    text-align: center;
    background: #ffffff;
}

.sig-space {
    height: 50px;
}

.sig-line {
    border-top: 1px dashed #94a3b8;
    margin-bottom: 0.5rem;
}

.sig-role {
    font-weight: 700;
    font-size: 0.8125rem;
    color: #0f172a;
}

.sig-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-top: 0.15rem;
}

.sig-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    margin-top: 0.25rem;
}

.dossier-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.71875rem;
    color: #94a3b8;
}

/* ==========================================================================
   Print Optimization Media Query (@media print)
   ========================================================================== */

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm 12mm;
    }

    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 9.5pt;
        line-height: 1.35;
    }

    .no-print,
    .sidebar,
    .topbar,
    .footer,
    .mobile-toggle,
    .print-actions-toolbar,
    .btn-input-action {
        display: none !important;
    }

    .layout-container,
    .main-content,
    .page-content,
    .project-print-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    .printable-dossier-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .dossier-table th {
        background: #f1f5f9 !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .dossier-table td,
    .dossier-table th {
        border: 1px solid #94a3b8 !important;
        padding: 4pt 6pt !important;
    }

    .section-title-strip {
        background: #e2e8f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .dossier-section,
    .signature-section {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .csmc-badge, .ascdcl-badge {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ==========================================================================
   Project Milestone Tracking & Management Styles
   ========================================================================== */
.milestones-dashboard {
    width: 100%;
}

.seq-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid #cbd5e1;
}

.milestone-code-badge {
    display: inline-block;
    padding: 2px 7px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
}

.predecessor-sub-tag {
    font-size: 0.71875rem;
    color: #6366f1;
    font-weight: 600;
    margin-top: 2px;
}

.row-overdue-highlight {
    background-color: #fff1f2 !important;
}

.row-overdue-highlight:hover {
    background-color: #ffe4e6 !important;
}

.view-switch-tabs {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 3px;
}

.view-tab-btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.view-tab-btn.active {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ==========================================================================
   Milestone Master Table Enhancements & Column Separation
   ========================================================================== */
.milestones-data-table {
    min-width: 1220px;
    table-layout: auto;
}

.milestones-data-table th,
.milestones-data-table td {
    vertical-align: top !important;
}

.milestones-data-table td.col-milestone-info,
.milestones-data-table td.col-project-ref,
.milestones-data-table td.col-officer-agency,
.milestones-data-table td.col-timeline {
    white-space: normal !important;
    word-break: break-word !important;
}

.milestone-title-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.milestone-desc-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 3px;
}

.project-ref-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.project-ref-badge {
    font-family: monospace;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
    text-decoration: none;
    border: 1px solid var(--primary-border);
    transition: var(--transition);
}

.project-ref-badge:hover {
    background: #e0e7ff;
    color: var(--primary-hover);
}

.project-title-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.35;
    font-weight: 500;
}

.project-org-sub {
    margin-top: 2px;
}

.executive-officer-block {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.executive-avatar-icon {
    font-size: 1rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.executive-officer-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
}

.executive-role-tag {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    display: inline-block;
}

.timeline-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
}

/* Custom Modal Backdrop & Dialog */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.custom-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 520px;
    padding: 1.5rem;
    animation: modalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
    border-radius: var(--radius-sm);
}

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

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    outline: none;
    transition: background 0.2s;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid #fff;
    transition: transform 0.15s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* ==========================================================================
   Executive Project Dashboard Specific Styling (Matches Figma/UI Spec)
   ========================================================================== */

.dash-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* Top Dashboard Header */
.dash-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.dash-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0;
}

.dash-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dash-last-updated {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dash-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.dash-refresh-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: rotate(30deg);
}

.dash-refresh-btn.spinning svg {
    animation: spin 0.8s linear infinite;
}

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

/* Filter Bar */
.dash-filter-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.dash-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    align-items: center;
}

@media (max-width: 1024px) {
    .dash-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dash-filter-grid {
        grid-template-columns: 1fr;
    }
}

.dash-filter-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dash-filter-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    min-width: fit-content;
}

.dash-filter-select {
    width: 100%;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.65rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-filter-select:hover {
    border-color: #cbd5e1;
}

.dash-filter-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* 5 Metric Grid Cards */
.dash-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.15rem;
}

@media (max-width: 1280px) {
    .dash-metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.dash-metric-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dash-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.06);
}

.dash-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Card 1: Total Projects (Blue) */
.dash-metric-card.card-total {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border-color: #dbeafe;
}
.dash-metric-card.card-total .dash-metric-icon {
    background: #2563eb;
    color: #ffffff;
}

/* Card 2: On Track (Green) */
.dash-metric-card.card-ontrack {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}
.dash-metric-card.card-ontrack .dash-metric-icon {
    background: #10b981;
    color: #ffffff;
}

/* Card 3: Delayed (Amber) */
.dash-metric-card.card-delayed {
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
    border-color: #fde68a;
}
.dash-metric-card.card-delayed .dash-metric-icon {
    background: #f59e0b;
    color: #ffffff;
}

/* Card 4: Critical (Red) */
.dash-metric-card.card-critical {
    background: linear-gradient(135deg, #fff1f2 0%, #ffffff 100%);
    border-color: #fecdd3;
}
.dash-metric-card.card-critical .dash-metric-icon {
    background: #ef4444;
    color: #ffffff;
}

/* Card 5: Completed (Purple) */
.dash-metric-card.card-completed {
    background: linear-gradient(135deg, #faf5ff 0%, #ffffff 100%);
    border-color: #e9d5ff;
}
.dash-metric-card.card-completed .dash-metric-icon {
    background: #8b5cf6;
    color: #ffffff;
}

.dash-metric-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.dash-metric-title {
    font-size: 0.785rem;
    font-weight: 600;
    color: #64748b;
    text-transform: capitalize;
}

.dash-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.dash-metric-badge {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dash-metric-badge.badge-green {
    color: #059669;
}
.dash-metric-badge.badge-amber {
    color: #d97706;
}
.dash-metric-badge.badge-red {
    color: #dc2626;
}
.dash-metric-badge.badge-purple {
    color: #7c3aed;
}

/* 4 Charts Grid */
.dash-charts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.15rem;
    align-items: stretch;
}

@media (max-width: 1400px) {
    .dash-charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-charts-grid {
        grid-template-columns: 1fr;
    }
}

.dash-chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    min-height: 330px;
}

.dash-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-chart-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.dash-chart-legend-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.dash-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #475569;
}

.dash-legend-color-box {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Donut Chart Inner Container */
.dash-donut-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 1;
    min-height: 220px;
}

.dash-donut-canvas-box {
    position: relative;
    width: 170px;
    height: 170px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    line-height: 1.1;
}

.dash-donut-center-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    display: block;
}

.dash-donut-center-label {
    font-size: 0.675rem;
    font-weight: 600;
    color: #64748b;
    display: block;
    margin-top: 2px;
}

.dash-donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
}

.dash-donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    font-size: 0.785rem;
}

.dash-donut-legend-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #334155;
    font-weight: 500;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-dot-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-donut-legend-right {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.785rem;
    white-space: nowrap;
}

/* Bar Chart Canvas Wrappers */
.dash-canvas-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 220px;
}

/* Recent Projects Table Card */
.dash-recent-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dash-recent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-recent-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.dash-recent-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dash-recent-link:hover {
    text-decoration: underline;
}

.dash-table-responsive {
    overflow-x: auto;
    width: 100%;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    text-align: left;
}

.dash-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.dash-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

.dash-table tbody tr:hover {
    background-color: #f8fafc;
}

.dash-project-id {
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.dash-project-name {
    font-weight: 600;
    color: #0f172a;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress bar inside table */
.dash-progress-cell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 130px;
}

.dash-progress-pct {
    font-weight: 600;
    font-size: 0.785rem;
    color: #334155;
    width: 32px;
}

.dash-progress-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.dash-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.dash-progress-fill.fill-green {
    background: #10b981;
}

.dash-progress-fill.fill-amber {
    background: #f59e0b;
}

.dash-progress-fill.fill-red {
    background: #ef4444;
}

.dash-progress-fill.fill-purple {
    background: #8b5cf6;
}

/* Status Pill Badges */
.dash-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.dash-status-pill.pill-ontrack {
    background: #dcfce7;
    color: #15803d;
}

.dash-status-pill.pill-delayed {
    background: #fef3c7;
    color: #b45309;
}

.dash-status-pill.pill-critical {
    background: #fee2e2;
    color: #b91c1c;
}

.dash-status-pill.pill-completed {
    background: #f3e8ff;
    color: #6b21a8;
}

.dash-action-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: #3b82f6;
    background: #eff6ff;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.dash-action-dots:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* ==========================================================================
   Multi-Language (i18n) Switcher Styles
   ========================================================================== */

.lang-selector-dropdown {
    position: relative;
    display: inline-block;
}

.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.lang-toggle-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.lang-selector-dropdown.active .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 1050;
    display: none;
    animation: langDropdownFade 0.18s ease forwards;
}

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

.lang-selector-dropdown.active .lang-menu {
    display: block;
}

.lang-menu-header {
    padding: 6px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.lang-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-menu-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.lang-menu-item.active {
    background: #f0fdf4;
    color: #15803d;
    font-weight: 600;
}

.lang-menu-flag {
    font-size: 1.15rem;
    line-height: 1;
}

.lang-menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lang-menu-label {
    line-height: 1.2;
}

.lang-menu-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.lang-check {
    margin-left: auto;
    color: #16a34a;
}

/* Auth Page Floating Language Switcher */
.auth-lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.auth-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.auth-lang-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.auth-lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}






