@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================
   Zakup — Торги по закупкам
   Sleek Dark Mode + Light Theme Toggle
   ============================================= */

/* --- Dark Theme (Default) --- */
:root {
    --primary: #38bdf8;          /* Vivid sky blue */
    --primary-dark: #0ea5e9;
    --primary-light: rgba(56, 189, 248, 0.12);
    --primary-glow: rgba(56, 189, 248, 0.25);

    --accent: #818cf8;           /* Soft indigo accent */
    --accent-light: rgba(129, 140, 248, 0.12);

    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.12);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.12);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.12);
    --info: #38bdf8;
    --info-light: rgba(56, 189, 248, 0.12);

    /* Dark surfaces */
    --bg-base: #0b0f19;
    --bg-surface: #111827;
    --bg-elevated: #1e293b;
    --bg-overlay: #1e293b;

    /* Dark grays */
    --gray-50: #1e293b;
    --gray-100: #1e293b;
    --gray-200: rgba(255, 255, 255, 0.08);
    --gray-300: rgba(255, 255, 255, 0.12);
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;

    /* Borders & Radius */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --radius: 12px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.08);

    /* Glassmorphism (dark) */
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.06);

    /* Card */
    --card-bg: rgba(30, 41, 59, 0.6);
    --card-border: 1px solid rgba(255, 255, 255, 0.06);
    --card-hover-border: rgba(56, 189, 248, 0.2);

    /* Inputs */
    --input-bg: rgba(15, 23, 42, 0.8);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus-border: var(--primary);
    --input-focus-glow: rgba(56, 189, 248, 0.2);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Login */
    --login-bg: radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(129, 140, 248, 0.06) 0%, transparent 50%),
                var(--bg-base);

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

/* --- Light Theme --- */
[data-theme="light"] {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: rgba(59, 130, 246, 0.08);
    --primary-glow: rgba(59, 130, 246, 0.15);

    --accent: #6366f1;
    --accent-light: rgba(99, 102, 241, 0.08);

    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.08);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.08);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.08);
    --info: #0ea5e9;
    --info-light: rgba(14, 165, 233, 0.08);

    /* Light surfaces */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #ffffff;
    --bg-overlay: #ffffff;

    /* Light grays */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Borders */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-subtle: rgba(0, 0, 0, 0.04);

    /* Shadows */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.06);

    /* Glassmorphism (light) */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);

    /* Card */
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: 1px solid rgba(0, 0, 0, 0.06);
    --card-hover-border: rgba(59, 130, 246, 0.3);

    /* Inputs */
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.12);
    --input-focus-border: var(--primary);
    --input-focus-glow: rgba(59, 130, 246, 0.15);

    /* Text */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Login */
    --login-bg: radial-gradient(ellipse at 30% 20%, hsla(220,100%,94%,1) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, hsla(280,100%,96%,1) 0%, transparent 50%),
                var(--bg-base);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-base);
    background-image:
        radial-gradient(ellipse at 15% 80%, rgba(56, 189, 248, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 20%, rgba(129, 140, 248, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    transition: background-color var(--theme-transition),
                color var(--theme-transition);
}

[data-theme="light"] body {
    background-image:
        radial-gradient(at 40% 20%, hsla(220,100%,94%,1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(280,100%,96%,1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(190,100%,94%,1) 0px, transparent 50%),
        radial-gradient(at 80% 100%, hsla(240,100%,96%,1) 0px, transparent 50%);
}

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

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

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: var(--glass-border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--theme-transition),
                border-color var(--theme-transition);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    letter-spacing: -0.5px;
    transition: color var(--theme-transition);
}

.logo:hover {
    color: var(--primary) !important;
}

.header nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius);
    transition: all var(--transition);
    font-weight: 500;
}

.header nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.header nav a[style*="font-weight:600"] {
    color: var(--primary);
    background: var(--primary-light);
}

/* --- Theme Toggle --- */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: rotate(15deg);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 4px 20px var(--primary-glow);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
    box-shadow: 0 2px 12px rgba(52, 211, 153, 0.2);
}

.btn-success:hover {
    background: #059669;
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 2px 12px rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #1e293b;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #d97706;
    color: #1e293b;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input, input[type="text"], input[type="number"], input[type="password"],
input[type="email"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}

.input:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 3px var(--input-focus-glow);
}

.input::placeholder, input::placeholder, textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Alerts --- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
    border: 1px solid transparent;
    backdrop-filter: blur(8px);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger);
    border-color: rgba(248, 113, 113, 0.2);
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-color: rgba(52, 211, 153, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border-color: rgba(251, 191, 36, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border-color: rgba(56, 189, 248, 0.2);
}

/* --- Cards --- */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: var(--card-border);
    overflow: hidden;
    transition: all var(--transition),
                background var(--theme-transition),
                border-color var(--theme-transition);
}

.card:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .card-header {
    background: rgba(0, 0, 0, 0.015);
}

.card-header h2, .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.card-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.01);
}

[data-theme="light"] .card-actions {
    background: rgba(0, 0, 0, 0.01);
}

/* --- Tables --- */
.table-wrap {
    overflow-x: auto;
}

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

th, td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

[data-theme="light"] th {
    background: rgba(0, 0, 0, 0.02);
}

tr:hover td {
    background: rgba(56, 189, 248, 0.03);
}

[data-theme="light"] tr:hover td {
    background: rgba(59, 130, 246, 0.03);
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-draft { background: var(--gray-200); color: var(--text-secondary); }
.badge-notified { background: var(--info-light); color: var(--info); }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-extended { background: var(--warning-light); color: var(--warning); }
.badge-finished { background: var(--gray-200); color: var(--text-muted); }

/* --- Login --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--login-bg);
    padding: 20px;
    transition: background var(--theme-transition);
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    transition: background var(--theme-transition),
                border-color var(--theme-transition);
}

.login-logo {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.login-footer a {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-footer a:hover {
    color: var(--primary);
}

/* Login theme toggle */
.login-theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* --- Admin Dashboard: Lot Grid --- */
.lot-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.lot-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: var(--card-border);
    transition: all var(--transition);
    overflow: hidden;
}

.lot-card:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--card-hover-border);
}

.lot-card .card-body {
    padding: 20px;
}

.lot-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.lot-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.lot-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.lot-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.lot-meta-item {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.lot-meta-item strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.lot-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* --- Participants Section --- */
.participants-section {
    margin-top: 32px;
}

.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.participant-info {
    display: flex;
    flex-direction: column;
}

.participant-name {
    font-weight: 500;
    color: var(--text-primary);
}

.participant-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.add-participant-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: flex-end;
}

.add-participant-form .form-group {
    margin-bottom: 0;
    flex: 1;
}

/* --- Auction Page --- */
.auction-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 40px;
    align-items: start;
}

.auction-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auction-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

/* Price display */
.price-display {
    text-align: center;
    padding: 24px;
}

.price-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.price-value {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

[data-theme="light"] .price-value {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-start {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Current price (auction page) */
.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0;
}

/* Timer */
.timer-block {
    text-align: center;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    margin-top: 12px;
    border: 1px solid var(--border-color);
}

.timer-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timer-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.timer-value.timer-warning {
    color: var(--warning);
}

.timer-value.timer-danger {
    color: var(--danger);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Bid form */
.bid-form {
    padding: 20px;
}

.bid-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.bid-input-group input {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.bid-hints {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.bid-hints span {
    display: inline-block;
    margin: 0 8px;
}

.bid-quick-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.bid-quick-btn {
    padding: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    font-family: inherit;
}

.bid-quick-btn:hover {
    background: var(--primary);
    color: white;
}

/* Bid list */
.bid-list {
    max-height: 400px;
    overflow-y: auto;
}

.bid-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition);
}

.bid-item:first-child {
    background: var(--success-light);
}

.bid-item-price, .bid-price {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.bid-item-time, .bid-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.bid-item-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.bid-item.bid-new {
    animation: bidFlash 1s ease;
}

.bid-item.bid-best {
    background: var(--success-light);
}

@keyframes bidFlash {
    0% { background: var(--primary-light); }
    100% { background: transparent; }
}

/* Status overlay */
.auction-status-overlay {
    text-align: center;
    padding: 40px 20px;
}

.auction-status-overlay h2 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auction-status-overlay p {
    color: var(--text-muted);
}

/* Connection indicator */
.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px 16px;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.connection-dot.connected, .online-dot {
    background: var(--success);
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.connection-dot.disconnected {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.4);
}

/* --- Monitor Page --- */
.monitor-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 40px;
    align-items: start;
}

.monitor-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.monitor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

.online-list {
    list-style: none;
}

.online-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.monitor-stat {
    text-align: center;
    padding: 16px;
}

.monitor-stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.monitor-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Audit log */
.log-item {
    padding: 8px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.log-item-time {
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
    margin-right: 8px;
}

.log-item-action {
    font-weight: 500;
    color: var(--text-secondary);
}

.log-item-details {
    color: var(--text-muted);
    margin-left: 4px;
}

.log-list {
    max-height: 300px;
    overflow-y: auto;
}

/* --- Results Page --- */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: var(--card-border);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}

.summary-card:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-color: var(--card-hover-border);
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Result detail layout */
.result-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    margin-bottom: 40px;
    align-items: start;
}

.result-detail-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* Price formatting */
.price {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Scrollbar styling (dark) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .auction-layout {
        grid-template-columns: 1fr;
    }

    .auction-sidebar {
        position: static;
    }

    .monitor-layout {
        grid-template-columns: 1fr;
    }

    .monitor-sidebar {
        position: static;
    }

    .result-detail-grid {
        grid-template-columns: 1fr;
    }

    .result-detail-sidebar {
        position: static;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .lot-meta {
        grid-template-columns: 1fr 1fr;
    }

    .price-value, .current-price {
        font-size: 2rem;
    }

    .bid-quick-buttons {
        grid-template-columns: repeat(2, 1fr);
    }

    .add-participant-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .login-card {
        padding: 24px;
    }

    .lot-meta {
        grid-template-columns: 1fr;
    }

    .lot-actions {
        flex-direction: column;
    }

    .lot-actions .btn {
        width: 100%;
    }
}
/ *   - - -   J T B D   A u c t i o n   P a n e l   U p d a t e s   - - -   * /  
 . b i d - p a n e l - w r a p p e r   {   p o s i t i o n :   s t i c k y ;   b o t t o m :   2 0 p x ;   z - i n d e x :   5 0 ;   m a r g i n - t o p :   2 4 p x ;   }  
 . f a s t - b i d - g r o u p   {   d i s p l a y :   g r i d ;   g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 2 ,   1 f r ) ;   g a p :   8 p x ;   m a r g i n - b o t t o m :   2 0 p x ;   }  
 @ m e d i a   ( m i n - w i d t h :   6 0 0 p x )   {   . f a s t - b i d - g r o u p   {   g r i d - t e m p l a t e - c o l u m n s :   r e p e a t ( 4 ,   1 f r ) ;   }   }  
 . f a s t - b i d - b t n   {   f o n t - w e i g h t :   6 0 0 ;   f o n t - f a m i l y :   m o n o s p a c e ;   w h i t e - s p a c e :   n o w r a p ;   }  
 . b i d - i n p u t - w r a p p e r   {   m a r g i n - b o t t o m :   1 6 p x ;   }  
 . b i d - i n p u t - g r o u p   {   p o s i t i o n :   r e l a t i v e ;   d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   }  
 . b i d - i n p u t - g r o u p   i n p u t   {   f o n t - s i z e :   1 . 5 r e m ;   f o n t - w e i g h t :   7 0 0 ;   f o n t - f a m i l y :   m o n o s p a c e ;   p a d d i n g - r i g h t :   4 0 p x ;   t e x t - a l i g n :   c e n t e r ;   b o r d e r - w i d t h :   2 p x ;   }  
 . c u r r e n c y - l a b e l   {   p o s i t i o n :   a b s o l u t e ;   r i g h t :   1 6 p x ;   f o n t - s i z e :   1 . 2 r e m ;   c o l o r :   v a r ( - - t e x t - m u t e d ) ;   f o n t - w e i g h t :   b o l d ;   }  
 . b i d - s t a t s   {   m a r g i n - t o p :   8 p x ;   f o n t - w e i g h t :   5 0 0 ;   f o n t - f a m i l y :   m o n o s p a c e ;   }  
 . b i d - s u b m i t - b t n   {   t e x t - t r a n s f o r m :   u p p e r c a s e ;   l e t t e r - s p a c i n g :   1 p x ;   b o x - s h a d o w :   0   4 p x   1 5 p x   v a r ( - - p r i m a r y - g l o w ) ;   f o n t - s i z e :   1 . 1 r e m ;   }  
 . b i d - s u b m i t - b t n : a c t i v e   {   t r a n s f o r m :   s c a l e ( 0 . 9 8 ) ;   }  
 @ k e y f r a m e s   s l i d e D o w n H i g h l i g h t   {   0 %   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( - 1 0 p x ) ;   b a c k g r o u n d - c o l o r :   v a r ( - - p r i m a r y - g l o w ) ;   }   1 0 0 %   {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   b a c k g r o u n d - c o l o r :   t r a n s p a r e n t ;   }   }  
 . n e w - b i d - a n i m   {   a n i m a t i o n :   s l i d e D o w n H i g h l i g h t   1 . 5 s   c u b i c - b e z i e r ( 0 . 4 ,   0 ,   0 . 2 ,   1 ) ;   }  
 @ k e y f r a m e s   u r g e n c y P u l s e   {   0 %   {   c o l o r :   v a r ( - - t e x t - p r i m a r y ) ;   t e x t - s h a d o w :   n o n e ;   }   5 0 %   {   c o l o r :   v a r ( - - w a r n i n g ) ;   t e x t - s h a d o w :   0   0   1 0 p x   v a r ( - - w a r n i n g - l i g h t ) ;   }   1 0 0 %   {   c o l o r :   v a r ( - - t e x t - p r i m a r y ) ;   t e x t - s h a d o w :   n o n e ;   }   }  
 . t i m e r . u r g e n t   {   a n i m a t i o n :   u r g e n c y P u l s e   1 . 5 s   i n f i n i t e ;   }  
 . b t n - i c o n   {   p a d d i n g :   6 p x ;   b o r d e r - r a d i u s :   5 0 % ;   w i d t h :   3 4 p x ;   h e i g h t :   3 4 p x ;   d i s p l a y :   i n l i n e - f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ;   f o n t - s i z e :   1 . 1 r e m ;   }  
 . p r i c e - p u l s e d   {   b a c k g r o u n d :   v a r ( - - p r i m a r y - l i g h t )   ! i m p o r t a n t ;   }  
 . p r i c e - u p d a t e d   {   c o l o r :   v a r ( - - s u c c e s s ) ;   t r a n s f o r m :   s c a l e ( 1 . 0 5 ) ;   t r a n s i t i o n :   a l l   0 . 2 s ;   }  
 