:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text: #334155;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 500px; }

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text); text-decoration: none; }
.logo span { color: var(--primary); }
.nav { display: flex; align-items: center; gap: 25px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.nav-link:hover, .nav-link.active { color: var(--primary); }

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}
.card-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; }
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.form-hint { color: var(--text-muted); font-size: 13px; margin-top: 5px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; }
.form-check input { margin-top: 3px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }

/* Alerts */
.alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #e0e7ff; color: #3730a3; }

/* Auth Pages */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-header { text-align: center; margin-bottom: 30px; }
.auth-logo { font-size: 2rem; font-weight: 700; }
.auth-logo span { color: var(--primary); }
.auth-tagline { color: var(--text-muted); margin-top: 5px; }
.auth-footer { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }

/* Auction Grid */
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.auction-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.auction-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.auction-card-image { aspect-ratio: 4/3; background: var(--bg); position: relative; }
.auction-card-image img { width: 100%; height: 100%; object-fit: cover; }
.auction-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.auction-card-body { padding: 15px; }
.auction-card-title { font-weight: 600; margin-bottom: 8px; }
.auction-card-price { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.auction-card-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 25px; }
.stat-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text); }
.stat-label { color: var(--text-muted); font-size: 14px; }

/* Bid Warning */
.bid-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.bid-warning-title { font-weight: 600; color: #92400e; margin-bottom: 8px; }
.bid-warning-text { color: #78350f; font-size: 14px; line-height: 1.6; }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 14px; }
.mb-2 { margin-bottom: 15px; }
.mb-3 { margin-bottom: 25px; }
.mt-2 { margin-top: 15px; }
.mt-3 { margin-top: 25px; }

/* Responsive */
@media (max-width: 768px) {
    .form-row { grid-template-columns: 1fr; }
    .nav { gap: 15px; }
    .auction-grid { grid-template-columns: 1fr; }
}
