/* ============================================================
   CONSIGNOR PORTAL — Public-Facing Styles
   Mobile-first responsive design for consignor login & dashboard
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────────── */
.cp-portal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}

.cp-portal *,
.cp-portal *::before,
.cp-portal *::after {
    box-sizing: border-box;
}

/* ── Login Page ────────────────────────────────────────────── */
.cp-login-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

.cp-login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cp-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.cp-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    color: #fff;
    margin-bottom: 16px;
}

.cp-login-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.cp-login-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.cp-login-form .cp-form-group {
    margin-bottom: 20px;
}

.cp-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cp-login-form input[type="text"],
.cp-login-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.cp-login-form input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.cp-login-help {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 24px;
    line-height: 1.6;
}

/* ── Buttons ───────────────────────────────────────────────── */
.cp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.cp-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

.cp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.cp-btn-full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.cp-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 12px;
}

.cp-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 8px;
}

.cp-btn-outline {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #6b7280;
}

.cp-btn-outline:hover {
    border-color: #9ca3af;
    color: #374151;
}

.cp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ── Alerts ────────────────────────────────────────────────── */
.cp-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}

.cp-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.cp-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.cp-portal-message {
    text-align: center;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
}

/* ── Dashboard ─────────────────────────────────────────────── */
.cp-dashboard {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px;
}

.cp-dash-header {
    margin-bottom: 24px;
}

.cp-dash-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cp-dash-welcome h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.cp-dash-sale-info {
    margin-bottom: 16px;
}

.cp-sale-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 4px;
}

.cp-sale-date {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* ── Deadline Bar ──────────────────────────────────────────── */
.cp-deadline-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px solid #fbbf24;
    border-radius: 12px;
}

.cp-deadline-icon {
    color: #d97706;
    flex-shrink: 0;
}

.cp-deadline-text {
    font-size: 13px;
    color: #92400e;
    flex: 1;
}

.cp-countdown {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cp-countdown-unit {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(217, 119, 6, 0.1);
    border-radius: 6px;
    font-size: 12px;
    color: #92400e;
    white-space: nowrap;
}

.cp-countdown-unit strong {
    font-size: 16px;
    margin-right: 3px;
}

/* ── Vehicle Cards ─────────────────────────────────────────── */
.cp-vehicle-count {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    background: #667eea;
    color: #fff;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
}

.cp-vehicle-card {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cp-vehicle-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.cp-vehicle-saved {
    border-color: #86efac;
    background: #f0fdf4;
}

.cp-vehicle-pending {
    border-color: #fde68a;
}

.cp-vehicle-locked {
    border-color: #d1d5db;
    background: #f9fafb;
    opacity: 0.85;
}

.cp-vehicle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cp-vehicle-lot {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cp-vehicle-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.cp-status-set {
    background: #dcfce7;
    color: #166534;
}

.cp-status-pending {
    background: #fef9c3;
    color: #854d0e;
}

.cp-status-locked {
    background: #f3f4f6;
    color: #6b7280;
}

.cp-vehicle-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.cp-vehicle-trim {
    font-size: 14px;
    font-weight: 400;
    color: #9ca3af;
}

.cp-vehicle-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 16px;
}

.cp-detail {
    display: flex;
    flex-direction: column;
}

.cp-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cp-detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.cp-title-warning {
    color: #dc2626;
    font-weight: 600;
}

/* ── Reserve Input ─────────────────────────────────────────── */
.cp-reserve-input-group {
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
}

.cp-reserve-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.cp-currency-input {
    position: relative;
    display: flex;
    align-items: center;
}

.cp-currency-symbol {
    position: absolute;
    left: 14px;
    font-size: 18px;
    font-weight: 600;
    color: #9ca3af;
    pointer-events: none;
}

.cp-reserve-input {
    width: 100%;
    padding: 14px 14px 14px 32px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cp-reserve-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.cp-reserve-input::placeholder {
    color: #d1d5db;
    font-weight: 400;
}

.cp-reserve-timestamp {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 6px;
}

/* ── Reserve Display (locked view) ─────────────────────────── */
.cp-reserve-display {
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-reserve-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.cp-reserve-value {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
}

.cp-reserve-none {
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
}

/* ── Save Bar ──────────────────────────────────────────────── */
.cp-save-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
}

/* ── Locked Notice ─────────────────────────────────────────── */
.cp-locked-notice {
    text-align: center;
    padding: 40px 24px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    margin-bottom: 32px;
}

.cp-locked-icon {
    color: #9ca3af;
    margin-bottom: 16px;
}

.cp-locked-notice h2 {
    font-size: 20px;
    color: #374151;
    margin: 0 0 12px;
}

.cp-locked-notice p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 8px;
}

/* ── Empty State ───────────────────────────────────────────── */
.cp-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.cp-empty-state p {
    margin: 0 0 8px;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .cp-login-card {
        padding: 28px 20px;
    }

    .cp-dash-welcome h1 {
        font-size: 20px;
    }

    .cp-vehicle-title {
        font-size: 17px;
    }

    .cp-deadline-bar {
        flex-wrap: wrap;
    }

    .cp-countdown {
        width: 100%;
        justify-content: center;
    }

    .cp-vehicle-details {
        gap: 8px 16px;
    }
}

@media (min-width: 768px) {
    .cp-dashboard {
        padding: 32px 24px;
    }

    .cp-vehicle-card {
        padding: 24px;
    }
}
