/* ============================================================
   AdvReferenceGen - Design System (main.css)
   AIAS - AI Automation Solutions
   React-inspired dark tech theme
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    /* Primary Palette */
    --primary: #61DAFB;
    --primary-dark: #21a1c4;
    --primary-light: #a8e8fc;
    --primary-glow: rgba(97, 218, 251, 0.3);
    
    /* Accent */
    --accent: #00D9FF;
    --accent-glow: rgba(0, 217, 255, 0.2);
    
    /* Backgrounds */
    --bg-darkest: #0A0A0B;
    --bg-dark: #0F1117;
    --bg-surface: #1A1A2E;
    --bg-card: #16213E;
    --bg-elevated: #1E293B;
    --bg-hover: #243447;
    --bg-input: #0F172A;
    
    /* Text */
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-bright: #F8FAFC;
    --text-on-primary: #0A0A0B;
    
    /* Borders */
    --border: #1E293B;
    --border-light: #334155;
    --border-focus: #61DAFB;
    
    /* Status */
    --success: #00E676;
    --success-bg: rgba(0, 230, 118, 0.1);
    --warning: #FFD600;
    --warning-bg: rgba(255, 214, 0, 0.1);
    --error: #FF5252;
    --error-bg: rgba(255, 82, 82, 0.1);
    --info: #448AFF;
    --info-bg: rgba(68, 138, 255, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #61DAFB 0%, #00D9FF 100%);
    --gradient-dark: linear-gradient(135deg, #0A0A0B 0%, #1A1A2E 100%);
    --gradient-card: linear-gradient(145deg, #1A1A2E 0%, #16213E 100%);
    --gradient-hero: linear-gradient(135deg, #0A0A0B 0%, #0F1117 40%, #1A1A2E 100%);
    --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(97, 218, 251, 0.15) 0%, transparent 60%);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(97, 218, 251, 0.15);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Glass */
    --glass-bg: rgba(26, 26, 46, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(20px);
    
    /* Sizes */
    --navbar-height: 72px;
    --sidebar-width: 260px;
    --container-max: 1200px;
}


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

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

body {
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-darkest);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-bright);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }


/* ---- Container ---- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}


/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(97, 218, 251, 0.1); }
    50% { box-shadow: 0 0 40px rgba(97, 218, 251, 0.25); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.animate-fade-in { animation: fadeIn 0.5s ease both; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }
.animate-slide-in { animation: slideInRight 0.4s ease both; }

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }


/* ---- Navbar ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    z-index: 1000;
    background: rgba(10, 10, 11, 0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(10, 10, 11, 0.95);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-bright);
    text-decoration: none;
}

.brand-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px rgba(97, 218, 251, 0.5));
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
}

.nav-link {
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-bright);
    background: var(--bg-hover);
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}


/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 24px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-on-primary);
    box-shadow: 0 2px 12px rgba(97, 218, 251, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(97, 218, 251, 0.5);
    transform: translateY(-1px);
    color: var(--text-on-primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--error);
    color: white;
}
.btn-danger:hover {
    background: #ff1744;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.4);
}

.btn-success {
    background: var(--success);
    color: var(--text-on-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    padding: 8px 16px;
}
.btn-ghost:hover {
    background: var(--accent-glow);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
    font-size: 1rem;
}


/* ---- Form Elements ---- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.form-control:hover {
    border-color: var(--border-light);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

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

.form-control.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-bg);
}

.form-control.readonly {
    background: var(--bg-elevated);
    color: var(--primary);
    font-weight: 600;
    cursor: default;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: var(--space-xs);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}


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

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-bright);
}

.card-body {
    color: var(--text-secondary);
}

.card-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}


/* ---- Stat Cards ---- */
.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--primary-glow);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}


/* ---- Alerts ---- */
.alert {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
    margin-bottom: var(--space-md);
    position: relative;
}

.alert-success {
    background: var(--success-bg);
    border: 1px solid rgba(0, 230, 118, 0.3);
    color: var(--success);
}

.alert-error {
    background: var(--error-bg);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: var(--error);
}

.alert-warning {
    background: var(--warning-bg);
    border: 1px solid rgba(255, 214, 0, 0.3);
    color: var(--warning);
}

.alert-info {
    background: var(--info-bg);
    border: 1px solid rgba(68, 138, 255, 0.3);
    color: var(--info);
}

.alert-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-message {
    flex: 1;
    font-size: 0.9rem;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    padding: 4px;
}

.alert-close:hover {
    opacity: 1;
}


/* ---- Tables ---- */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table thead {
    background: var(--bg-surface);
}

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

.data-table td {
    padding: 12px 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

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

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

.table-actions {
    display: flex;
    gap: var(--space-xs);
}


/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(255, 214, 0, 0.3);
}

.badge-danger {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(68, 138, 255, 0.3);
}

.badge-primary {
    background: rgba(97, 218, 251, 0.1);
    color: var(--primary);
    border: 1px solid rgba(97, 218, 251, 0.3);
}


/* ---- Modal ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.3s ease;
}

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

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

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

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

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}


/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: calc(var(--navbar-height) + 16px);
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.4s ease;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--info); }


/* ---- Loading Spinner ---- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 11, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}


/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    margin-top: var(--space-lg);
}

.pagination .page-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination .page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-btn.active {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
}

.pagination .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.4;
}

.empty-state .empty-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.empty-state .empty-text {
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto var(--space-lg);
}


/* ---- Progress Bar ---- */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}


/* ---- Utility Classes ---- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.85rem; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

.hidden { display: none !important; }
.relative { position: relative; }


/* ---- Footer ---- */
.footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-lg);
    margin-top: var(--space-4xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: var(--space-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: var(--space-md);
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.footer-heading {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a, .footer-links span {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-contact svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    color: var(--text-on-primary);
    border-color: var(--primary);
}

.footer-bottom {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* ---- Responsive ---- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand-col {
        grid-column: 1 / -1;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }
}

@media (max-width: 768px) {
    .navbar-menu {
        position: fixed;
        top: var(--navbar-height);
        right: -100%;
        width: 280px;
        height: calc(100vh - var(--navbar-height));
        flex-direction: column;
        background: var(--bg-surface);
        padding: var(--space-lg);
        border-left: 1px solid var(--border);
        transition: right var(--transition-base);
        gap: var(--space-xs);
    }
    
    .navbar-menu.open {
        right: 0;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .nav-link {
        padding: var(--space-md);
        width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .btn-lg {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* ---- Password Visibility Toggle ---- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper .form-control {
    padding-right: 48px; /* Room for the icon */
    width: 100%;
}

.btn-show-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    margin: 0;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    width: 24px;
    outline: none;
    z-index: 5;
}

.btn-show-password svg {
    width: 18px;
    height: 18px;
}

.btn-show-password:hover {
    color: var(--text-bright);
}
