/* Base variables and resets */
:root {
    --bg-dark: #090d16;
    --bg-card: #111827;
    --bg-input: #1f2937;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-gold: #f59e0b;
    --accent-gold-hover: #d97706;
    --accent-silver: #94a3b8;
    --border-color: #374151;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navbar & Responsive Navigation */
.navbar {
    background-color: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    border-bottom: 2px solid var(--accent-gold);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.nav-logo {
    height: 42px;
    width: auto;
}

.brand-name {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.btn-signup {
    background-color: var(--accent-gold);
    color: #000 !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold !important;
}

.btn-signup:hover {
    background-color: var(--accent-gold-hover);
}

.btn-logout {
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem !important;
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444 !important;
}

/* Hamburger Menu Icon */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

/* Container */
.container {
    flex: 1;
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: radial-gradient(circle, #1e293b 0%, #090d16 100%);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.hero-logo {
    height: 140px;
    width: auto;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--accent-gold);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card);
}

/* User Profile Banner */
.profile-banner {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.profile-welcome h2 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.profile-welcome p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.logo-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-logo {
    height: 45px;
    width: auto;
}

/* Cards & Content Blocks */
.section-title {
    text-align: center;
    color: #fff;
    font-size: 1.6rem;
    margin-bottom: 25px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--accent-gold);
    margin: 8px auto 0;
}

/* Grid Layouts */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.highlight-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
}

.highlight-card .icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.highlight-card h4 {
    color: #fff;
    margin-bottom: 5px;
}

.highlight-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Plans Design */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.plan-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.plan-card.silver {
    border: 2px solid var(--accent-silver);
}

.plan-card.gold {
    border: 2px solid var(--accent-gold);
}

.plan-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-card.silver .plan-header {
    background: linear-gradient(135deg, #374151, #1f2937);
}

.plan-card.gold .plan-header {
    background: linear-gradient(135deg, #78350f, #451a03);
}

.plan-header h3 {
    color: #fff;
    font-size: 1.3rem;
}

.plan-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: var(--bg-dark);
}

.plan-badge.alert {
    background-color: #ef4444;
    color: #fff;
}

.plan-price {
    padding: 20px;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0,0,0,0.2);
}

.plan-price .currency {
    color: var(--accent-gold);
}

.plan-price .per {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.plan-body {
    padding: 20px;
}

.plan-body ul {
    list-style: none;
    margin-bottom: 15px;
}

.plan-body ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.deduction-rule {
    background-color: rgba(0,0,0,0.2);
    padding: 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    border-left: 3px solid var(--accent-gold);
}

/* Sessions */
.sessions-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
}

.sessions-grid {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 15px;
}

.session-box {
    text-align: center;
}

.session-box h4 {
    margin-bottom: 5px;
}

.session-box p {
    color: var(--text-secondary);
}

.session-box .cutoff {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
}

.divider-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Explainer Grid */
.explainer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.explainer-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 12px;
}

.explainer-box h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.explainer-box ul {
    list-style: none;
}

.explainer-box ul li {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Simulated Binary Visual */
.binary-visual {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.node {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.node.parent {
    border-color: var(--accent-gold);
}

.branch {
    display: flex;
    gap: 40px;
    margin-top: 15px;
}

/* Corporate / Vision Banner */
.vision-banner {
    background: linear-gradient(135deg, #78350f, #1e293b);
    padding: 25px;
    text-align: center;
    border-radius: 12px;
    border: 1px solid var(--accent-gold);
}

/* Forms styling (Smarter UI with Centralized Logo) */
.form-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 12px;
    max-width: 420px;
    margin: 40px auto;
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-logo {
    height: 100px;
    width: auto;
    margin-bottom: 15px;
}

.form-container h2 {
    color: #fff;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Form controls (inputs and select dropdowns) */
.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

/* Styles dropdown options in dark-theme compatible colors */
.form-group select option {
    background-color: var(--bg-card);
    color: #fff;
}

/* Styling for the Phone Number with country code prefix */
.input-group {
    display: flex;
    align-items: center;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.input-group-addon {
    background-color: #1f2937; /* Contrasting background for prefix */
    color: var(--accent-gold);
    padding: 12px 15px;
    font-weight: bold;
    border-right: 1px solid var(--border-color);
    user-select: none;
    font-size: 0.95rem;
}

.input-group input {
    border: none !important; /* Overrides default borders for seamless inclusion */
    border-radius: 0 !important;
    flex: 1;
    background-color: transparent !important;
}

.input-group input:focus {
    outline: none;
}

/* Gives the unified input block a border glow on select */
.input-group:focus-within {
    border-color: var(--accent-gold);
}

.switch-form {
    margin-top: 20px;
    font-size: 0.85rem;
    text-align: center;
    color: var(--text-secondary);
}

.switch-form a {
    color: var(--accent-gold);
    text-decoration: none;
}

.switch-form a:hover {
    text-decoration: underline;
}

/* ==========================================
   Admin Dashboard Table and Layout (Improved)
   ========================================== */

.admin-table-container {
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    overflow-x: auto; /* Handles horizontal scrolls on mobile gracefully */
}

/* Header row layout with separation border */
.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Distinct contrasting table headers with column boundaries */
.admin-table th {
    background-color: var(--bg-input);
    color: var(--accent-gold);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 16px 20px;
    border-bottom: 3px solid var(--accent-gold); /* Solid golden base line */
    border-right: 1px solid var(--border-color);   /* Vertical column dividers */
}

.admin-table th:last-child {
    border-right: none; /* Removes outer right border */
}

/* Table cell spacing, borders, and readability */
.admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
}

.admin-table td:last-child {
    border-right: none; /* Removes outer right border */
}

/* Alternating rows (Zebra Striping) for reading ease */
.admin-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Row hover highlight using gold accent tint */
.admin-table tbody tr:hover {
    background-color: rgba(245, 158, 11, 0.08) !important;
    transition: background-color 0.15s ease-in-out;
}

/* Footer */
.footer {
    background-color: var(--bg-card);
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
}

/* MOBILE RESPONSIVE MEDIA QUERIES */
@media (max-width: 768px) {
    /* Navbar Collapse to Drawer */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-card);
        position: absolute;
        top: 72px; /* Navbar height boundary */
        left: 0;
        padding: 20px;
        border-bottom: 2px solid var(--accent-gold);
        gap: 15px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.4);
    }

    /* Action to display responsive drawer menu */
    .nav-links.active {
        display: flex;
    }

    /* Transform hamburger menu to an X shape when active */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Layout stack rules */
    .plans-grid, .explainer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sessions-grid {
        flex-direction: column;
        gap: 15px;
    }

    .divider-circle {
        transform: rotate(90deg);
    }

    .profile-banner {
        flex-direction: column;
        text-align: center;
    }

    .logo-badge {
        flex-direction: column;
    }
}