/* ===== RentalAuction — App-style Premium UI ===== */

:root {
    --p: #0d9488;
    --p-dark: #0f766e;
    --p-light: #f0fdfa;
    --p-soft: #ccfbf1;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --danger: #ef4444;
    --success: #10b981;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-soft: #f1f5f9;
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 18px;
    --r-xl: 24px;
    --shadow-1: 0 1px 2px rgba(15,23,42,.04);
    --shadow-2: 0 4px 12px rgba(15,23,42,.06);
    --shadow-3: 0 12px 28px rgba(15,23,42,.10);
    --shadow-4: 0 24px 60px rgba(15,23,42,.16);
}

/* ===== Animations ===== */
@keyframes fadeUp { from {opacity:0; transform:translateY(8px);} to {opacity:1; transform:translateY(0);} }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
@keyframes shimmer { 0%{background-position:-200% 0;} 100%{background-position:200% 0;} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn { from {transform:translateX(20px); opacity:0;} to{transform:translateX(0); opacity:1;} }

.fadeUp { animation: fadeUp .4s ease both; }
.live-dot { width:8px; height:8px; background:var(--danger); border-radius:50%; display:inline-block; animation: pulse 1.5s infinite; }

/* ===== Hero (auction list) ===== */
.au-hero-wrap {
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 50%, #6366f1 100%);
    color: white;
    border-radius: var(--r-xl);
    padding: 36px 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.au-hero-wrap::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.au-hero-wrap h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 6px; }
.au-hero-wrap p { opacity: 0.9; font-size: 14px; margin: 0; }
.au-hero-stats { display:flex; gap:24px; margin-top:20px; flex-wrap:wrap; }
.au-hero-stats .item { background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); border-radius: var(--r); padding: 12px 18px; font-size: 13px; }
.au-hero-stats .item strong { display:block; font-size:22px; font-weight:800; }

/* ===== Filter Pills ===== */
.au-filter-row {
    display: flex; gap: 8px; align-items: center;
    overflow-x: auto; padding: 4px 0 12px;
    scrollbar-width: none;
}
.au-filter-row::-webkit-scrollbar { display: none; }
.pill {
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.pill:hover { border-color: var(--p); color: var(--p); transform: translateY(-1px); }
.pill.active { background: var(--p); color: white; border-color: var(--p); box-shadow: 0 4px 12px rgba(13,148,136,0.3); }

/* ===== Sort/Toolbar ===== */
.au-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.au-sort {
    display: inline-flex; gap: 4px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 4px;
}
.au-sort a {
    padding: 6px 14px; border-radius: 7px;
    font-size: 13px; font-weight: 600;
    color: var(--text-2); text-decoration: none;
}
.au-sort a.on { background: var(--p); color: white; }

/* ===== Auction Card (Modern) ===== */
.au-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}
.au-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: all .25s cubic-bezier(.4,0,.2,1);
    position: relative;
    display: block;
    animation: fadeUp .4s ease both;
}
.au-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-3);
    border-color: var(--p-soft);
}
.au-card-thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #ccfbf1 0%, #cffafe 50%, #e0e7ff 100%);
    position: relative;
    display: flex; align-items: center; justify-content: center;
    font-size: 72px;
    overflow: hidden;
}
.au-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.4));
}
.au-card-cat {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--p-dark);
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 11px; font-weight: 700;
    z-index: 2;
}
.au-card-status {
    position: absolute; top: 12px; right: 12px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 11px; font-weight: 700;
    z-index: 2;
    display: inline-flex; align-items: center; gap: 4px;
}
.au-card-status.live { background: rgba(16,185,129,0.95); color: white; }
.au-card-status.urgent { background: rgba(239,68,68,0.95); color: white; }
.au-card-status.done { background: rgba(100,116,139,0.95); color: white; }
.au-card-deadline {
    position: absolute; bottom: 12px; left: 12px;
    color: white; font-size: 12px; font-weight: 700;
    z-index: 2; display: inline-flex; align-items: center; gap: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.au-card-body { padding: 16px 18px 18px; }
.au-card-title {
    font-size: 15px; font-weight: 700;
    color: var(--text); line-height: 1.45;
    margin: 0 0 8px;
    height: 42px; overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.au-card-meta { display: flex; gap: 10px; font-size: 12px; color: var(--text-3); margin-bottom: 12px; flex-wrap: wrap; }
.au-card-foot {
    display: flex; justify-content: space-between; align-items: end;
    padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.au-card-foot .price-label { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.au-card-foot .price { font-size: 18px; font-weight: 800; color: var(--p); line-height: 1; }
.au-card-foot .price small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.au-card-foot .bid-cnt {
    background: var(--p-light); color: var(--p-dark);
    padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 4px;
}

/* Watchlist heart */
.au-card-fav {
    position: absolute; bottom: 12px; right: 12px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: transform .15s;
    border: none;
}
.au-card-fav:hover { transform: scale(1.1); }
.au-card-fav svg { width: 18px; height: 18px; stroke: var(--text-2); fill: none; stroke-width: 2; }
.au-card-fav.on svg { stroke: var(--danger); fill: var(--danger); }

/* ===== Detail Page (Two Column) ===== */
.au-view {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}
.au-main {
    background: var(--surface);
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}
.au-aside { position: sticky; top: 80px; }
@media (max-width: 968px) {
    .au-view { grid-template-columns: 1fr; }
    .au-aside { position: static; }
}

.au-banner {
    aspect-ratio: 21/9;
    background: linear-gradient(135deg, #ccfbf1, #cffafe, #e0e7ff);
    display: flex; align-items: center; justify-content: center;
    font-size: 100px;
    position: relative;
}
.au-banner-overlay {
    position: absolute; top: 16px; left: 16px; right: 16px;
    display: flex; justify-content: space-between; align-items: start;
}
.au-content-wrap { padding: 28px 32px 32px; }
.au-content-wrap h1 {
    font-size: 26px; font-weight: 800; color: var(--text);
    letter-spacing: -0.5px; line-height: 1.4; margin: 0 0 12px;
}
.au-content-meta {
    display: flex; gap: 16px; color: var(--text-3); font-size: 13px;
    margin-bottom: 20px; flex-wrap: wrap;
}
.au-content-meta span { display: inline-flex; align-items: center; gap: 4px; }

.au-fact-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
    margin: 20px 0;
}
.au-fact {
    background: var(--bg);
    border-radius: var(--r);
    padding: 14px;
    border: 1px solid var(--border-soft);
}
.au-fact .l { font-size: 11px; font-weight: 600; color: var(--text-3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.3px; }
.au-fact .v { font-size: 16px; font-weight: 800; color: var(--text); }
.au-fact.primary { background: linear-gradient(135deg, var(--p-light), var(--p-soft)); border: none; }
.au-fact.primary .v { color: var(--p-dark); }

.au-text {
    padding: 24px 0;
    line-height: 1.85; font-size: 15px; color: var(--text-2);
    border-top: 1px solid var(--border-soft);
    white-space: pre-wrap;
}

/* ===== Sticky Sidebar Bid Panel ===== */
.au-bid-panel {
    background: white;
    border-radius: var(--r-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    overflow: hidden;
    margin-bottom: 20px;
}
.au-bid-panel-head {
    background: linear-gradient(135deg, var(--p) 0%, #0891b2 100%);
    color: white;
    padding: 20px 24px;
    text-align: center;
}
.au-countdown {
    font-size: 12px; opacity: 0.9; margin-bottom: 4px;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.au-countdown-time {
    font-size: 28px; font-weight: 800;
    font-feature-settings: "tnum"; letter-spacing: -0.5px;
}
.au-bid-panel-body { padding: 24px; }
.au-bid-summary {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 20px;
}
.au-bid-summary .stat {
    background: var(--bg);
    border-radius: var(--r);
    padding: 12px;
    text-align: center;
}
.au-bid-summary .stat .l { font-size: 10px; color: var(--text-3); font-weight: 600; text-transform: uppercase; }
.au-bid-summary .stat .v { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 2px; }
.au-bid-summary .stat.best { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.au-bid-summary .stat.best .v { color: var(--accent-dark); }

/* Bid form (inside panel) */
.au-bid-form input, .au-bid-form select, .au-bid-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface);
    transition: border-color .15s;
    box-sizing: border-box;
}
.au-bid-form input:focus, .au-bid-form select:focus, .au-bid-form textarea:focus {
    outline: none;
    border-color: var(--p);
}
.au-bid-form label { display:block; font-size:12px; font-weight:700; color:var(--text-2); margin:12px 0 6px; }
.au-bid-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.au-bid-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transition: transform .15s;
}
.au-bid-submit:hover { transform: translateY(-1px); }

/* ===== Bid List ===== */
.bid-list { display: flex; flex-direction: column; gap: 10px; }
.bid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all .15s;
    animation: fadeUp .3s ease both;
}
.bid:hover { border-color: var(--p-soft); }
.bid.best { border: 2px solid var(--accent); background: linear-gradient(180deg, #fffbeb 0%, white 100%); box-shadow: 0 4px 16px rgba(245,158,11,0.15); }
.bid.won { border: 2px solid var(--success); background: linear-gradient(180deg, #f0fdf4 0%, white 100%); }
.bid.lost { opacity: 0.5; }

.bid-rank {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--p-light);
    color: var(--p-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 16px;
    flex-shrink: 0;
}
.bid.best .bid-rank { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: white; }
.bid.won .bid-rank { background: linear-gradient(135deg, var(--success), #059669); color: white; }

.bid-vendor { flex: 1; min-width: 0; }
.bid-vendor-name { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.bid-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; }
.bid-badge.verified { background: #dbeafe; color: #1e40af; }
.bid-badge.best { background: #fef3c7; color: #92400e; }
.bid-badge.won { background: #dcfce7; color: #15803d; }
.bid-badge.mine { background: var(--p); color: white; }
.bid-rating { font-size: 11px; color: var(--text-3); }
.bid-memo { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.bid-time { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.bid-price { text-align: right; flex-shrink: 0; }
.bid-price .l { font-size: 10px; color: var(--text-3); }
.bid-price .v { font-size: 22px; font-weight: 800; color: var(--p); line-height: 1.2; }
.bid-price .v small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.bid-price .total { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.bid-select-btn {
    margin-top: 6px; padding: 6px 12px;
    background: var(--p); color: white;
    border: none; border-radius: 6px;
    font-size: 11px; font-weight: 700;
    cursor: pointer;
}

/* ===== Empty / Login state ===== */
.empty-state {
    background: white; border: 1px dashed var(--border);
    border-radius: var(--r-xl); padding: 60px 20px;
    text-align: center; color: var(--text-3);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .au-hero-wrap { padding: 24px 20px; border-radius: var(--r-lg); }
    .au-hero-wrap h1 { font-size: 22px; }
    .au-hero-stats { gap: 8px; }
    .au-hero-stats .item { padding: 10px 14px; flex: 1; min-width: 0; }
    .au-hero-stats .item strong { font-size: 18px; }
    .au-content-wrap { padding: 20px; }
    .au-content-wrap h1 { font-size: 22px; }
    .au-fact-grid { grid-template-columns: repeat(2, 1fr); }
    .au-grid { grid-template-columns: 1fr; gap: 14px; }
    .bid { padding: 14px; gap: 12px; flex-wrap: wrap; }
    .bid-rank { width: 40px; height: 40px; font-size: 14px; }
    .bid-price .v { font-size: 18px; }
    .au-bid-form .row { grid-template-columns: 1fr; }
}
