/* ===================================================================
   NSE GLASGOW MEMBER PORTAL - GREEN & GOLD BRANDED DESIGN SYSTEM
   Primary: Emerald Green (#006837) | Accent: Gold (#D4AF37)
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --primary: #006837;
    --primary-dark: #004d28;
    --primary-light: #10b981;
    --accent-gold: #D4AF37;
    --accent-gold-dark: #b89528;
    --accent-gold-light: #fef08a;
    --bg-light: #f4f7f5;
    --surface-white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #475569;
    --border-color: #cbd5e1;
    
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 25px -5px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 30px -10px rgba(0, 104, 55, 0.2);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism & Cards */
.card-glass {
    background: var(--surface-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-dark);
}

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

a:hover {
    color: var(--primary-dark);
}

/* Full Page Wrapper for Auth & Wizard */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #004d28 0%, #006837 50%, #0a381e 100%);
    padding: 2rem 1rem 4rem 1rem;
    position: relative;
    overflow-y: auto;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(0,0,0,0) 70%);
    top: -150px;
    right: -150px;
    border-radius: 50%;
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 960px;
    background: var(--surface-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--accent-gold);
    overflow: visible;
    margin: 0 auto;
}

/* Brand Header - Rich Green & Gold */
.brand-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--surface-white);
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid var(--accent-gold);
    border-top-left-radius: calc(var(--radius-lg) - 2px);
    border-top-right-radius: calc(var(--radius-lg) - 2px);
}

.brand-header .logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    transition: var(--transition);
}

.brand-logo-img-lg {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
    margin-bottom: 8px;
}

.sidebar-header .brand-logo-img {
    width: 40px;
    height: 40px;
}

.brand-header .logo-badge {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.3rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    font-family: 'Outfit', sans-serif;
}

.brand-header h2 {
    color: var(--surface-white);
    font-size: 1.4rem;
    margin: 0;
}

.brand-header p {
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 700;
}

/* Multi-Step Wizard Styling */
.wizard-steps {
    display: flex;
    justify-content: space-between;
    background: #f8fafc;
    padding: 1.25rem 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.step-item .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    transition: var(--transition);
}

.step-item.active {
    color: var(--primary);
}

.step-item.active .step-number {
    background: var(--primary);
    color: var(--surface-white);
    box-shadow: 0 0 0 4px rgba(0, 104, 55, 0.2);
}

.step-item.completed {
    color: var(--success);
}

.step-item.completed .step-number {
    background: var(--success);
    color: var(--surface-white);
}

/* Form Controls */
.wizard-body {
    padding: 2.5rem 2rem;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

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

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 104, 55, 0.15);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-color: #fef2f2;
}

.error-msg {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: block;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.85rem 1.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--surface-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(0, 104, 55, 0.35);
}

.btn-accent {
    background: var(--accent-gold);
    color: var(--primary-dark);
    font-weight: 800;
}

.btn-accent:hover {
    background: var(--accent-gold-dark);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

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

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-danger {
    background: var(--danger);
    color: var(--surface-white);
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

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

.sidebar {
    width: 270px;
    background: var(--primary-dark);
    color: var(--surface-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    border-right: 3px solid var(--accent-gold);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    list-style: none;
    padding: 1.5rem 1rem;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem;
    color: #e2e8f0;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent-gold);
    border-left: 4px solid var(--accent-gold);
}

.sidebar-menu .submenu {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.main-content {
    margin-left: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-nav {
    height: 75px;
    background: var(--surface-white);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-gold);
}

.content-body {
    padding: 2rem;
    flex: 1;
}

/* Badges & Alerts */
.badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.alert-success { background: #d1fae5; border-left: 5px solid var(--success); color: #065f46; }
.alert-warning { background: #fef3c7; border-left: 5px solid var(--warning); color: #92400e; }
.alert-danger  { background: #fee2e2; border-left: 5px solid var(--danger);  color: #991b1b; }

/* Digital ID Card Styling */
.digital-id-card {
    width: 380px;
    height: 240px;
    background: linear-gradient(135deg, #006837 0%, #004d28 100%);
    border-radius: 16px;
    color: white;
    padding: 20px;
    position: relative;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    border: 3px solid var(--accent-gold);
    overflow: hidden;
}

.digital-id-card::before {
    content: 'NSE GLASGOW';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255,255,255,0.06);
    pointer-events: none;
}

.id-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.5);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.id-card-header h4 {
    color: var(--accent-gold);
    font-size: 0.95rem;
    margin: 0;
}

.id-card-body {
    display: flex;
    gap: 15px;
}

.id-card-photo {
    width: 80px;
    height: 95px;
    border-radius: 8px;
    border: 2px solid var(--accent-gold);
    object-fit: cover;
    background: #1e293b;
}

.id-card-details h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.id-card-details p {
    font-size: 0.8rem;
    color: #cbd5e1;
    margin: 2px 0;
}

.id-card-reg {
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-gold);
    background: rgba(0,0,0,0.4);
    padding: 3px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 6px;
}

/* Tables */
.data-table-wrapper {
    background: var(--surface-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

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

.table th {
    background: #f1f5f9;
    padding: 1rem;
    text-align: left;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.table tr:hover {
    background: #f8fafc;
}

/* Mobile Backdrop Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 95;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 6px 10px;
}

/* Comprehensive Responsive Breakpoints */
@media (max-width: 992px) {
    .mobile-toggle-btn {
        display: none !important;
    }

    .sidebar {
        display: none !important;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-nav {
        padding: 0 0.75rem;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .top-nav h3 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 55vw;
    }

    .top-nav > div:first-child {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }

    .top-nav > div:first-child img {
        height: 32px !important;
        flex-shrink: 0;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .user-profile-badge > div {
        display: none;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    /* Tighter card padding on mobile */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    /* Action buttons in top nav (admin pages) */
    .top-nav a.btn,
    .top-nav button.btn {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
        white-space: nowrap;
    }

    /* Form controls better sizing */
    .form-control {
        font-size: 0.9rem;
    }

    /* Badge and status chips */
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Data table wrapper horizontal scroll */
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        padding: 1rem 0.5rem 2rem 0.5rem;
    }

    .auth-card {
        border-radius: var(--radius-md);
    }

    .brand-header {
        padding: 1.25rem 1rem;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .brand-header .logo {
        flex-direction: column;
    }

    .wizard-steps {
        padding: 1rem 0.75rem;
        overflow-x: auto;
        gap: 8px;
        justify-content: flex-start;
    }

    .step-item {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .wizard-body {
        padding: 1.5rem 1rem;
    }

    .content-body {
        padding: 1rem;
    }

    .digital-id-card {
        width: 100%;
        max-width: 360px;
        height: auto;
        aspect-ratio: 1.6 / 1;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.1rem; }
    .btn { width: 100%; padding: 0.75rem 1rem; }
    .wizard-footer { flex-direction: column; gap: 10px; }
    .wizard-footer .btn { width: 100%; }
}

/* Admin Stats Grid Responsive */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

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

/* Table responsive scroll */
.data-table-wrapper {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .table th, .table td {
        padding: 0.65rem 0.5rem;
        font-size: 0.8rem;
    }
    .top-nav {
        height: 60px;
    }
}

/* Fixed App-Style Bottom Navigation Bar (Mobile & Tablet) */
.bottom-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 68px;
    background: linear-gradient(180deg, #004d28 0%, #00331b 100%);
    border-top: 2px solid var(--accent-gold);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    align-items: center;
    justify-content: space-around;
    padding: 4px 6px;
    backdrop-filter: blur(10px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
    text-align: center;
    padding: 6px 0;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.bottom-nav-item i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.12);
}

.bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--accent-gold);
}

@media (max-width: 992px) {
    .bottom-nav-bar {
        display: flex;
    }
    .content-body {
        padding-bottom: 90px !important;
    }
    footer {
        margin-bottom: 68px;
    }
}


