/* 
   Corporate Bidding System CSS
   Theme: Premium (Black, Gold, White)
*/

:root {
    --primary-black: #121212;
    --secondary-black: #1E1E1E;
    --primary-gold: #D4AF37;
    --secondary-gold: #C5A028;
    --primary-white: #FFFFFF;
    --secondary-white: #F5F5F5;
    --text-muted: #A0A0A0;
    --danger-red: #E74C3C;
    --success-green: #2ECC71;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-black);
    background-image:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(212,175,55,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 90% 100%, rgba(212,175,55,0.04) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--primary-white);
    margin: 0;
    padding: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--primary-black); 
}
::-webkit-scrollbar-thumb {
    background: #444; 
    border-radius: 4px;
    border: 2px solid var(--primary-black);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-gold); 
}

/* Custom Backgrounds */
.bg-gray-36 {
    background-color: #363636 !important;
}

/* Custom Gold Button */
.btn-gold {
    background-color: var(--primary-gold);
    color: var(--primary-black);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-gold:hover, .btn-gold:focus {
    background-color: var(--secondary-gold);
    color: var(--primary-black);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-gold:disabled {
    background-color: #7a6520;
    color: #444;
    cursor: not-allowed;
    box-shadow: none;
}

/* Cards */
.card {
    background-color: var(--secondary-black);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    background-color: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid #333;
    color: var(--primary-gold);
    font-weight: bold;
}

/* Forms */
.form-control, .form-select {
    background-color: #2A2A2A;
    border: 1px solid #444;
    color: var(--primary-white);
}

.form-control:focus, .form-select:focus {
    background-color: #333;
    border-color: var(--primary-gold);
    color: var(--primary-white);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}

.form-label {
    color: var(--text-muted);
}

/* Tables */
.table {
    color: var(--primary-white);
}
.table-dark {
    background-color: var(--secondary-black);
}
.table-dark th {
    background-color: #252525;
    color: var(--primary-gold);
    border-color: #444;
}
.table-dark td {
    border-color: #444;
}

/* Loaders (Anti-Spam Mechanism) */
.btn-loader {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loader::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--primary-black);
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

.btn-gold.btn-loader::after {
    border-top-color: var(--primary-black);
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-light.btn-loader::after {
    border-top-color: var(--primary-gold);
}

@keyframes button-spin {
    to { transform: rotate(360deg); }
}

/* Password Eye Icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

.password-toggle {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    z-index: 10;
}

input[type="password"] {
    padding-right: 45px !important;
}

/* Fix Bootstrap text-muted for dark backgrounds */
.text-muted {
    color: var(--text-muted) !important;
}

/* Live Bidding Banner */
.time-extended-banner {
    background-color: var(--primary-gold);
    color: var(--primary-black);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    display: none;
    animation: fadeInOut 5s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; display: none; }
}

/* Global Full Page Loader for critical uploads */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(18, 18, 18, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(212, 175, 55, 0.3);
    border-top-color: var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    margin-top: 15px;
    color: var(--primary-gold);
    font-weight: bold;
}

/* ── Navbar (simple original) ────────────────────────────────────────── */
.navbar {
    padding: 0.75rem 0;
}
.navbar-brand {
    font-size: 1.25rem !important;
    letter-spacing: 0.3px;
}
#server-time-clock {
    font-size: 0.82rem;
    letter-spacing: 0.4px;
    padding: 5px 12px;
    border-radius: 20px !important;
}
/* Make all navbar buttons slightly bigger */
.navbar .btn-sm {
    font-size: 0.82rem;
    padding: 5px 14px;
}

/* ── Profile Popup ──────────────────────────────────────────────────── */
#profile-popup {
    display: none;
    position: absolute;
    top: 60px;
    right: 16px;
    width: 300px;
    background-color: #1e1e1e;
    border: 1px solid var(--primary-gold);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.55);
    z-index: 1050;
    overflow: hidden;
    animation: popupFadeIn 0.18s ease forwards;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding: 12px 16px;
}
.popup-header h5 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-gold);
}
.popup-close {
    cursor: pointer;
    color: rgba(255,255,255,0.45);
    font-size: 1rem;
    transition: color 0.2s;
    line-height: 1;
}
.popup-close:hover {
    color: var(--primary-gold);
}

/* Avatar circle */
.popup-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #111;
    font-weight: 700;
    flex-shrink: 0;
}

.popup-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 16px;
    transition: background 0.18s;
}
.popup-row:hover {
    background: rgba(255,255,255,0.03);
}
.popup-row-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: rgba(212,175,55,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-gold);
    font-size: 0.78rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.popup-row-label {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}
.popup-row-value {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    word-break: break-all;
}

/* Custom Switches */
.form-check-input { background-color: #333; border-color: #555; }
.form-check-input:checked { background-color: var(--primary-gold); border-color: var(--primary-gold); }
.form-check-label { color: var(--primary-white); }

/* Placeholder Visibility */
.form-control::placeholder, .form-select::placeholder { color: #A0A0A0 !important; opacity: 1 !important; }

/* Admin Dashboard Redesign - Sidebar & Layout */
#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-width: 260px;
    max-width: 260px;
    background-color: #121212 !important;
    border-right: 1px solid #2A2A2A;
    transition: all 0.3s ease;
}

#sidebar-wrapper .sidebar-heading {
    padding: 1.5rem 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-gold);
    border-bottom: 1px solid #2A2A2A;
}

#sidebar-wrapper .list-group-item {
    background-color: transparent !important;
    color: #A0A0A0;
    border: none;
    padding: 0.85rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#sidebar-wrapper .list-group-item:hover {
    color: var(--primary-gold);
    background-color: #1E1E1E !important;
    padding-left: 1.75rem;
}

#sidebar-wrapper .list-group-item.active {
    color: var(--primary-gold) !important;
    background-color: #1E1E1E !important;
    font-weight: 600;
    border-left: 4px solid var(--primary-gold);
    padding-left: calc(1.5rem - 4px);
}

#page-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--primary-black);
    min-height: 100vh;
}

/* Sidebar Responsive Styles */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -260px;
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
}

.gold-gradient-text {
    background: linear-gradient(135deg, #FFDF00 0%, #D4AF37 50%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-wrapper, .content-wrapper {
    width: 95%;
    max-width: 1400px;
}
@media (min-width: 768px) {
    .hero-wrapper {
        width: 85%;
    }
    .content-wrapper {
        width: 80%;
    }
}
