:root {
    --gold: #D4AF37;
    --gold-light: #F4C430;
    --black: #111111;
    --dark-grey: #ffffff;
    /* Re-purposed as Card White for easy flip, or just use white */
    --light-grey: #f9f9f9;
    /* Main background */
    --white: #ffffff;
    --text-color: #333333;
    --transition: all 0.3s ease;
    --border-color: #eeeeee;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: var(--light-grey);
    color: var(--text-color);
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Prompt', sans-serif;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: var(--white);
    color: var(--black);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.logo {
    font-size: 24px;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--gold);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active,
.dropbtn.active {
    color: var(--gold);
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--black);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Navbar Styles */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        display: none;
        /* Hidden by default */
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        border-top: 1px solid #f0f0f0;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links a,
    .dropbtn {
        display: block;
        padding: 15px 20px;
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background-color: #f9f9f9;
        display: none;
        /* JS will toggle */
        padding-left: 20px;
    }

    .dropdown-content.show {
        display: block;
    }

    .dropdown:hover .dropdown-content {
        display: none;
        /* Disable hover on mobile, use click */
    }
}

/* Dropdown (Desktop) */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    top: 100%;
}

/* Show dropdown on hover for desktop only */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 15px;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--gold);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:hover .dropbtn {
    color: var(--gold);
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1610375461490-679813152429?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--gold);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
}

.cta-button {
    padding: 12px 30px;
    background-color: var(--gold);
    color: var(--white);
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background-color: #b8860b;
    color: var(--white);
}

/* Sections */
.section-padding {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
    color: var(--black);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--gold);
}

.gold-text {
    color: var(--gold);
}

/* Auth / Card Containers */
.auth-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-card,
.content-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    color: var(--text-color);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.wide-card {
    max-width: 900px !important;
}

.page-container {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Forms */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--black);
}

.form-control,
.form-select,
input[type="text"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 6px;
    font-size: 15px;
    transition: var(--transition);
    margin-bottom: 15px;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Tables */
.table-responsive {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #fdfaf0;
    /* Light gold tint */
    color: #8a6d0b;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
}

/* Utilities */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.mb-3 {
    margin-bottom: 1rem;
}

.g-3 {
    gap: 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
}

.row>* {
    padding: 10px;
}

.col-12 {
    width: 100%;
}

.col-sm-6 {
    width: 50%;
}

.col-sm-4 {
    width: 33.33%;
}

.col-sm-3 {
    width: 25%;
}

@media (max-width: 768px) {

    .col-sm-6,
    .col-sm-4,
    .col-sm-3 {
        width: 100%;
    }

    .navbar {
        padding: 15px;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu needed later */
}

/* Stepper */
.stepper-header {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.step-indicator {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #eee;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
}

/* Premium Logout/Login Button */
.auth-nav-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 8px 16px !important;
    border-radius: 50px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold) !important;
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: var(--transition);
    font-weight: 600 !important;
    font-size: 14px !important;
}

.auth-nav-link:hover {
    background: var(--gold);
    color: white !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.auth-nav-link i {
    font-size: 1.1rem;
}

.auth-nav-link .user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-icon {
    font-size: 0.9rem !important;
    opacity: 0.8;
}

.login-nav-link {
    background: rgba(212, 175, 55, 1);
    color: white !important;
}

.login-nav-link:hover {
    background: #b8860b;
}

.step-indicator.active {
    background-color: var(--gold);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

/* Stepper Content Logic */
.content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

.btn-primary {
    background: var(--gold);
    color: white;
}

.btn-primary:hover {
    background: #b8860b;
}

.btn-secondary {
    background: #eee;
    color: #555;
}

/* Filter Card */
.filter-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Summary Cards (Dashboard) */
.summary-cards {
    display: flex;
    gap: 20px;
}

.summary-card {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.summary-card h3 {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.summary-card .value {
    font-size: 24px;
    font-weight: bold;
    color: var(--black);
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.bg-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.bg-pending {
    background: #fff3e0;
    color: #ef6c00;
}

.bg-partial {
    background: #e3f2fd;
    color: #1565c0;
}


.mb-3 {
    margin-bottom: 1rem;
}

.mb-0 {
    margin-bottom: 0;
}

.form-control,
.form-select {
    width: 100%;
    padding: 10px;
    background-color: #ffffff;
    /* White background for clarity */
    border: 1px solid #ccc;
    color: #000000;
    /* Black text */
    border-radius: 4px;
}

.form-control::placeholder {
    color: #888;
}

/* Ensure dropdown options are also readable */
.form-select option {
    background-color: #ffffff;
    color: #000000;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

.btn-primary {
    background-color: var(--gold);
    color: var(--black);
    font-weight: bold;
}

.btn-secondary {
    background-color: #555;
    color: var(--white);
}

.btn-success {
    background-color: #28a745;
    color: white;
}

/* Login Page Styles */
.bg-dark {
    background-color: var(--black);
}

.login-container {
    min-height: 80vh;
    /* Adjust based on nav/footer height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    background-color: #1a1a1a;
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: var(--gold);
    font-family: 'Prompt', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
}

.input-icon-wrapper input,
.input-icon-wrapper select {
    padding-left: 40px;
    /* Space for icon */
}

.forgot-password {
    color: var(--gold);
    font-size: 0.8rem;
    text-decoration: none;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
}

.login-footer p {
    color: #666;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 20px;
}

.w-100 {
    width: 100%;
}

/* Custom Table for Dark Theme */
.table-dark-custom {
    width: 100%;
    border-collapse: collapse;
    color: #e0e0e0;
    /* Light text for readability */
    font-size: 1rem;
}

.table-dark-custom th,
.table-dark-custom td {
    padding: 12px 15px;
    border-bottom: 1px solid #444;
    /* Subtle border */
    text-align: left;
}

.table-dark-custom th {
    background-color: #333;
    /* Slightly lighter header */
    color: var(--gold);
    /* Gold header text */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-dark-custom tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
    /* Soft gold hover */
    transition: background-color 0.3s ease;
}

.table-dark-custom td {
    font-weight: 300;
}