/* ═══════════════════════════════════════════════════════════════
   AMT Customer Tune Portal — Styles
   Design: Cream/off-white bg, #dc0000 accent, Inter font
   ═══════════════════════════════════════════════════════════════ */

.amt-portal {
    max-width: 900px;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* ── Empty state ────────────────────────────────────────────── */
.amt-portal-empty {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.amt-portal-empty-icon { margin-bottom: 20px; opacity: 0.6; }
.amt-portal-empty h3 {
    color: #111;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}
.amt-portal-empty p {
    color: #666;
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.5;
}
.amt-portal-empty .amt-portal-btn { margin-top: 20px; }

/* ── Header row ─────────────────────────────────────────────── */
.amt-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}
.amt-portal-header-left { display: flex; align-items: baseline; gap: 8px; }
.amt-portal-count {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #dc0000;
    line-height: 1;
}
.amt-portal-count-label {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Buttons ────────────────────────────────────────────────── */
.amt-portal-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.02em;
}
.amt-portal-btn-primary {
    background: #dc0000;
    color: #fff;
}
.amt-portal-btn-primary:hover {
    background: #b00000;
    color: #fff;
    text-decoration: none;
}
.amt-portal-btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
}
.amt-portal-btn-sm:hover {
    border-color: #dc0000;
    color: #dc0000;
    text-decoration: none;
}
.amt-portal-btn-add {
    width: 100%;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(220, 0, 0, 0.06);
    color: #dc0000;
    border: 1px solid rgba(220, 0, 0, 0.2);
    margin-top: 10px;
}
.amt-portal-btn-add:hover {
    background: #dc0000;
    color: #fff;
    border-color: #dc0000;
}
.amt-portal-btn-add.loading {
    opacity: 0.6;
    pointer-events: none;
}
.amt-portal-btn-add.added {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
    pointer-events: none;
}

/* ── Vehicle card ───────────────────────────────────────────── */
.amt-vehicle-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.amt-vehicle-card:hover {
    border-color: #ddd;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* Vehicle header */
.amt-vehicle-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #f0f0f0;
}
.amt-vehicle-name {
    font-size: 17px;
    font-weight: 600;
    color: #111;
    margin: 0 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.amt-vehicle-year {
    font-size: 13px;
    font-weight: 400;
    color: #888;
    margin-left: 6px;
}
.amt-vehicle-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #888;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}
.amt-vehicle-sep { color: #ddd; }
.amt-vehicle-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
}
.amt-vehicle-badge-dot {
    width: 5px; height: 5px;
    background: #4caf50;
    border-radius: 50%;
    animation: amt-pulse 2s infinite;
}
@keyframes amt-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Original purchase */
.amt-vehicle-original {
    padding: 12px 20px;
    background: #f8f8f6;
    border-bottom: 1px solid #f0f0f0;
}
.amt-vehicle-original-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.amt-vehicle-original-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* Section labels */
.amt-vehicle-section-label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}

/* Owned upgrades */
.amt-vehicle-owned {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.amt-owned-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.amt-owned-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}
.amt-owned-check {
    font-size: 11px;
    color: #4caf50;
}

/* Available upgrades */
.amt-vehicle-upgrades {
    padding: 16px 20px 20px;
}
.amt-upgrade-group {
    margin-bottom: 16px;
}
.amt-upgrade-group:last-child {
    margin-bottom: 0;
}
.amt-upgrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.amt-upgrade-item {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.amt-upgrade-item:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.amt-upgrade-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.amt-upgrade-name {
    font-size: 13px;
    font-weight: 500;
    color: #222;
}
.amt-upgrade-price {
    font-family: 'Rajdhani', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #dc0000;
    line-height: 1;
    flex-shrink: 0;
}
.amt-upgrade-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* Fully loaded message */
.amt-vehicle-complete {
    padding: 16px 20px;
    text-align: center;
    font-size: 13px;
    color: #888;
}
.amt-complete-icon {
    color: #dc0000;
    margin-right: 4px;
}

/* ── Toast notification ─────────────────────────────────────── */
.amt-portal-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.amt-portal-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.amt-portal-toast.success {
    background: #ffffff;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}
.amt-portal-toast.error {
    background: #ffffff;
    border: 1px solid #ffcdd2;
    color: #c62828;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .amt-portal-header { flex-direction: column; gap: 10px; }
    .amt-upgrade-grid { grid-template-columns: 1fr; }
    .amt-vehicle-header { flex-direction: column; gap: 10px; }
    .amt-vehicle-meta { flex-wrap: wrap; }
}
