/* =====================================================
   AUCTION MANAGEMENT SYSTEM - GLOBAL STYLESHEET
   Theme: Navy Blue & White (two-tone)

   TABLE OF CONTENTS
   1.  Root Variables
   2.  Reset & Base
   3.  Layout - Auth Pages
   4.  Layout - Dashboard (Sidebar, Main, Topbar)
   5.  Components - Buttons & Links
   6.  Components - Forms & Inputs
   7.  Components - Cards & Messages
   8.  Components - Badges & Pills
   9.  Dashboard - Stats Grid
   10. Dashboard - Lots List
   11. Dashboard - Bidders List
   12. Dashboard - Activity Feed
   13. Responsive - Auth Pages
   14. Responsive - Dashboard
   ===================================================== */


/* =====================================================
   1. ROOT VARIABLES
   ===================================================== */

:root {
    /* Core two-tone palette */
    --navy: #1a2b4c;
    --navy-dark: #101b33;
    --navy-light: #2c4374;
    --navy-tint: rgba(26, 43, 76, 0.08);
    --white: #ffffff;
    --off-white: #f4f6f9;
    --border-color: #d6dde8;
    --text-dark: #1a2b4c;
    --text-muted: #6b7a99;
    --shadow: 0 4px 12px rgba(26, 43, 76, 0.12);

    /* Status colors (functional - status/alerts only) */
    --status-live-bg: #fee2e2;
    --status-live-text: #dc2626;
    --status-upcoming-bg: #fef3c7;
    --status-upcoming-text: #d97706;
    --status-closed-bg: #eef1f6;
    --status-closed-text: #6b7a99;
    --status-success: #16a34a;
}


/* =====================================================
   2. RESET & BASE
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
    line-height: 1.5;
}


/* =====================================================
   3. LAYOUT - AUTH PAGES
   (login, register, forgot/reset password)
   ===================================================== */

.page-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: var(--white);
    padding: 40px 30px;
    width: 100%;
    max-width: 380px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.container h2 {
    color: var(--navy);
    margin-bottom: 25px;
    font-size: 1.6rem;
}


/* =====================================================
   4. LAYOUT - DASHBOARD (Sidebar, Main, Topbar)
   ===================================================== */

.dashboard-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 220px;
    background: var(--navy-dark);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-logo span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    display: block;
    margin-top: 2px;
}

.nav-section {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    padding: 1rem 1.25rem 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 1.25rem;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left: 2px solid var(--white);
}

.nav-item i {
    font-size: 17px;
}

.nav-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Main content --- */
.main {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.topbar h1 {
    font-size: 20px;
    font-weight: 600;
    color: var(--navy);
}

.topbar p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    flex-shrink: 0;
}


/* =====================================================
   5. COMPONENTS - BUTTONS & LINKS
   ===================================================== */

.btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn:hover {
    background: var(--navy-light);
}

.btn:active {
    background: var(--navy-dark);
}

.btn:disabled {
    background: var(--navy-light);
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: var(--white);
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

.btn.btn-link {
    display: block;
    text-decoration: none;
    text-align: center;
}

a {
    color: var(--navy);
    text-decoration: none;
    font-size: 0.9rem;
}

a:hover {
    text-decoration: underline;
    color: var(--navy-light);
}

.link-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 8px;
}

.back {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.back a {
    color: var(--navy);
    text-decoration: none;
}


/* =====================================================
   6. COMPONENTS - FORMS & INPUTS
   ===================================================== */

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
}

.form-input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--off-white);
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px var(--navy-tint);
    background: var(--white);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* --- Password field with show/hide toggle --- */
.input-wrap {
    position: relative;
}

.input-wrap .form-input {
    padding-right: 40px;
}

.toggle-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    user-select: none;
}

.hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Password strength meter --- */
.strength-bar {
    height: 4px;
    border-radius: 4px;
    background: var(--border-color);
    margin-top: 8px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}

.strength-label {
    font-size: 11px;
    margin-top: 4px;
    color: var(--text-muted);
}


/* =====================================================
   7. COMPONENTS - CARDS & MESSAGES
   ===================================================== */

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    font-size: 17px;
    color: var(--navy-light);
}

.row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 1.5rem;
}

/* --- Logo / heading block (auth pages) --- */
.logo {
    text-align: center;
    margin-bottom: 24px;
}

.logo h2 {
    font-size: 20px;
    color: var(--navy);
}

.logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Inline alert messages --- */
.msg {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.msg.error {
    background: var(--status-live-bg);
    color: var(--status-live-text);
    border: 1px solid #fecaca;
}

.msg.success {
    background: #dcfce7;
    color: var(--status-success);
    border: 1px solid #bbf7d0;
}

.expired-icon {
    text-align: center;
    font-size: 48px;
    margin-bottom: 16px;
}


/* =====================================================
   8. COMPONENTS - BADGES & PILLS
   ===================================================== */

.live-badge {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--status-live-bg);
    color: var(--status-live-text);
    font-weight: 500;
    white-space: nowrap;
}

.pill {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    margin-right: 4px;
}

.pill-live {
    background: var(--status-live-bg);
    color: var(--status-live-text);
}

.pill-upcoming {
    background: var(--status-upcoming-bg);
    color: var(--status-upcoming-text);
}

.pill-closed {
    background: var(--status-closed-bg);
    color: var(--status-closed-text);
}


/* =====================================================
   9. DASHBOARD - STATS GRID
   ===================================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 1.5rem;
}

.stat {
    background: var(--white);
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-label i {
    font-size: 15px;
    color: var(--navy);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
}

.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-sub.up {
    color: var(--status-success);
}


/* =====================================================
   10. DASHBOARD - LOTS LIST
   ===================================================== */

.lot-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--off-white);
}

.lot-row:last-child {
    border-bottom: none;
}

.lot-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--off-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.lot-info {
    flex: 1;
    min-width: 0;
}

.lot-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lot-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.lot-bid {
    text-align: right;
    flex-shrink: 0;
}

.lot-bid-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}

.lot-bid-count {
    font-size: 11px;
    color: var(--text-muted);
}


/* =====================================================
   11. DASHBOARD - BIDDERS LIST
   ===================================================== */

.bidder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--off-white);
}

.bidder-row:last-child {
    border-bottom: none;
}

.bidder-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--navy-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--navy);
    flex-shrink: 0;
}

.bidder-name {
    font-size: 13px;
    color: var(--text-dark);
    flex: 1;
}

.bidder-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.bidder-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
}


/* =====================================================
   12. DASHBOARD - ACTIVITY FEED
   ===================================================== */

.activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2rem;
}

.activity-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--off-white);
}

.activity-row:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
    background: var(--navy-light);
}

.activity-dot.success {
    background: var(--status-success);
}

.activity-dot.warning {
    background: var(--status-upcoming-text);
}

.activity-dot.danger {
    background: var(--status-live-text);
}

.activity-text {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
}

.activity-text b {
    color: var(--text-dark);
}

.activity-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}


/* =====================================================
   13. RESPONSIVE - AUTH PAGES
   ===================================================== */

@media (max-width: 480px) {
    .container {
        padding: 30px 20px;
        max-width: 100%;
    }

    .container h2 {
        font-size: 1.4rem;
    }

    .link-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 420px;
        padding: 50px 40px;
    }
}


/* =====================================================
   14. RESPONSIVE - DASHBOARD
   ===================================================== */

/* Tablet: sidebar narrows, layout still side by side */
@media (max-width: 1024px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .row2 {
        grid-template-columns: 1fr;
    }
}

/* Mobile: sidebar becomes a horizontal scrollable top bar */
@media (max-width: 768px) {
    .dashboard-body {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        white-space: nowrap;
    }

    .sidebar-logo {
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
        flex-shrink: 0;
    }

    .sidebar-logo span {
        display: none;
    }

    .nav-section {
        display: none;
    }

    .nav-item {
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 10px 14px;
        font-size: 10px;
        text-align: center;
    }

    .nav-item.active {
        border-left: none;
        border-bottom: 2px solid var(--white);
    }

    .nav-item i {
        font-size: 18px;
    }

    .nav-logout {
        margin-top: 0;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        margin-left: auto;
    }

    .main {
        padding: 1rem;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .topbar h1 {
        font-size: 18px;
    }

    .lot-bid-val,
    .bidder-amount {
        font-size: 12px;
    }
}