/* ============================================================
   ADUKE HUB — Application Stylesheet
   Branding: Deep Green, Vibrant Yellow, White
   ============================================================ */

:root {
    /* Brand color system */
    --green-900: #0d3b1f;
    --green-800: #14532d;
    --green-700: #166534;
    --green-600: #15803d;
    --green-500: #16a34a;
    --green-400: #22c55e;
    --green-100: #dcfce7;
    --green-50: #f0fdf4;

    --yellow-600: #ca8a04;
    --yellow-500: #eab308;
    --yellow-400: #facc15;
    --yellow-300: #fde047;
    --yellow-100: #fef9c3;
    --yellow-50: #fefce8;

    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-100: #dbeafe;

    --orange-500: #f97316;
    --orange-100: #ffedd5;

    --red-600: #dc2626;
    --red-500: #ef4444;
    --red-100: #fee2e2;

    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;

    --white: #ffffff;

    /* Semantic */
    --primary: var(--green-700);
    --primary-hover: var(--green-800);
    --accent: var(--yellow-400);
    --accent-hover: var(--yellow-500);
    --success: var(--green-600);
    --warning: var(--yellow-500);
    --error: var(--red-500);

    --bg: var(--gray-50);
    --surface: var(--white);
    --text: var(--gray-900);
    --text-muted: var(--gray-500);
    --border: var(--gray-200);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

    --nav-height: 60px;
    --content-max: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }

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

/* ===== Navigation ===== */
.top-nav {
    background: var(--green-900);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
    gap: 16px;
}

.nav-brand a { text-decoration: none; }
.nav-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}
.nav-logo::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--yellow-400);
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.nav-links a {
    color: rgba(255,255,255,0.85);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 12px;
    padding-left: 16px;
    border-left: 1px solid rgba(255,255,255,0.15);
}
.nav-user-name { color: var(--white); font-size: 14px; font-weight: 500; }
.btn-logout {
    background: rgba(255,255,255,0.12);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}
.btn-logout:hover { background: rgba(255,255,255,0.2); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    margin-left: auto;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
}

/* ===== Layout ===== */
.app-main { max-width: var(--content-max); margin: 0 auto; padding: 24px 20px; }
.app-guest { max-width: var(--content-max); margin: 0 auto; padding: 0; }

/* ===== Page Header ===== */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 26px; color: var(--green-900); }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--green-600); color: var(--white); }
.btn-primary:hover { background: var(--green-700); color: var(--white); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-ghost { background: transparent; color: var(--gray-600); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-700); }
.btn-full { width: 100%; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-link { color: var(--primary); font-size: 13px; font-weight: 600; padding: 2px 6px; }
.btn-link:hover { text-decoration: underline; }

/* ===== Cards / Sections ===== */
.content-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}
.content-section h2 { font-size: 18px; color: var(--green-800); margin-bottom: 16px; }

.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    max-width: 800px;
}

.detail-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.detail-card h3 { font-size: 16px; color: var(--green-700); margin-bottom: 12px; }
.detail-list dt { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 8px; }
.detail-list dd { font-size: 15px; color: var(--text); margin-bottom: 4px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; }

/* ===== Stat Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gray-300);
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-green { border-left-color: var(--green-500); }
.stat-yellow { border-left-color: var(--yellow-400); }
.stat-dark { border-left-color: var(--green-800); }
.stat-blue { border-left-color: var(--blue-500); }
.stat-orange { border-left-color: var(--orange-500); }
.stat-red { border-left-color: var(--red-500); }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--gray-900); margin: 4px 0; }
.stat-sub { font-size: 13px; color: var(--text-muted); }

/* ===== Tables ===== */
.table-container { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tbody tr:hover { background: var(--gray-50); }
.actions-cell { white-space: nowrap; }
.mono { font-family: 'Courier New', monospace; font-weight: 600; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-green { background: var(--green-100); color: var(--green-700); }
.badge-yellow { background: var(--yellow-100); color: var(--yellow-600); }
.badge-blue { background: var(--blue-100); color: var(--blue-600); }
.badge-red { background: var(--red-100); color: var(--red-600); }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.form-full { grid-column: 1 / -1; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.form-error { color: var(--error); font-size: 13px; margin-top: 4px; }
.form-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.form-check-group { margin: 8px 0; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }

/* ===== Alerts ===== */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.alert-success { background: var(--green-100); color: var(--green-700); border: 1px solid var(--green-400); }
.alert-error { background: var(--red-100); color: var(--red-600); border: 1px solid var(--red-500); }

/* ===== Search Bar ===== */
.search-bar { display: flex; gap: 8px; margin-bottom: 20px; }
.search-bar input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }

/* ===== Login ===== */
.login-container { min-height: calc(100vh - var(--nav-height)); display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--green-900), var(--green-700)); padding: 20px; }
.login-card { background: var(--white); border-radius: var(--radius-lg); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-logo { font-size: 28px; font-weight: 800; color: var(--green-900); letter-spacing: -1px; }
.login-logo::after { content: ''; display: inline-block; width: 10px; height: 10px; background: var(--yellow-400); border-radius: 50%; margin-left: 6px; }
.login-tagline { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.login-footer { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 24px; }

/* ===== Welcome / Guest ===== */
.hero { background: linear-gradient(135deg, var(--green-900) 0%, var(--green-600) 100%); color: var(--white); padding: 80px 24px; text-align: center; }
.hero-title { font-size: 48px; font-weight: 800; letter-spacing: -1px; }
.hero-title::after { content: ''; display: inline-block; width: 14px; height: 14px; background: var(--yellow-400); border-radius: 50%; margin-left: 8px; }
.hero-tagline { font-size: 20px; color: var(--yellow-300); margin: 8px 0 16px; font-weight: 500; }
.hero-description { max-width: 600px; margin: 0 auto 28px; font-size: 16px; color: rgba(255,255,255,0.9); }
.hero .btn-primary { background: var(--yellow-400); color: var(--green-900); }
.hero .btn-primary:hover { background: var(--yellow-300); color: var(--green-900); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; padding: 60px 24px; max-width: var(--content-max); margin: 0 auto; }
.feature-card { background: var(--surface); border-radius: var(--radius); padding: 32px 24px; text-align: center; box-shadow: var(--shadow-sm); transition: transform 0.2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-icon { font-size: 40px; margin-bottom: 12px; }
.feature-card h3 { color: var(--green-800); margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 14px; }

.locations { padding: 60px 24px; max-width: var(--content-max); margin: 0 auto; }
.locations h2 { text-align: center; color: var(--green-800); margin-bottom: 32px; font-size: 28px; }
.location-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.location-card { background: var(--surface); border-left: 4px solid var(--yellow-400); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.location-card h3 { color: var(--green-700); margin-bottom: 6px; }
.location-card p { color: var(--text-muted); font-size: 14px; }

.guest-footer { text-align: center; padding: 32px; background: var(--green-900); color: rgba(255,255,255,0.7); font-size: 13px; }
.guest-footer p { margin: 4px 0; }

/* ===== Branch List ===== */
.branch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.branch-card { background: var(--gray-50); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: border-color 0.15s; }
.branch-card:hover { border-color: var(--green-400); }
.branch-card h3 { font-size: 15px; color: var(--green-800); }
.branch-code { font-family: monospace; font-size: 13px; color: var(--text-muted); }
.branch-type { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.simple-list { list-style: none; }
.simple-list li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.simple-list li:last-child { border-bottom: none; }

.empty-state { text-align: center; color: var(--text-muted); padding: 32px; font-size: 15px; }

/* ===== Verification Cards ===== */
.verification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.verify-card {
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
}
.verify-card h4 {
    font-size: 15px;
    color: var(--green-800);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--green-900);
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 4px;
        transform: translateY(-200%);
        transition: transform 0.2s;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.open { transform: translateY(0); }
    .nav-links a { padding: 12px 16px; }
    .nav-user { border-left: none; border-top: 1px solid rgba(255,255,255,0.15); padding: 12px 16px 0; margin-left: 0; }

    .form-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 22px; }
    .stat-value { font-size: 26px; }
    .hero-title { font-size: 36px; }
    .login-card { padding: 28px 20px; }
    .app-main { padding: 16px 12px; }
}
