/* ==========================================================
   Velocity Warranty Portal — shared stylesheet
   Brand: orange #FE5426, navy #0F1F3D, Poppins, glassmorphism
   ========================================================== */

:root {
    --orange: #FE5426;
    --orange-dark: #e0431a;
    --navy: #0F1F3D;
    --navy-light: #16294f;
    --green: #1FAA59;
    --red: #E43F3F;
    --amber: #F2A93B;
    --text-muted: #7c8aa5;
    --border: rgba(255, 255, 255, 0.14);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at 15% 0%, #1a2d55 0%, var(--navy) 45%, #081226 100%);
    color: #eef1f8;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}

/* ---------- glass card ---------- */
.glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28);
}

/* ---------- top brand bar ---------- */
.brand-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 16px 6px;
    text-align: center;
}
.brand-bar .brand-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 14px var(--orange);
}
.brand-bar h1 {
    font-size: 1.15rem;
    letter-spacing: .5px;
    margin: 0;
    font-weight: 600;
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 22px;
    border-radius: 12px;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff;
    box-shadow: 0 6px 18px rgba(254, 84, 38, 0.35);
}
.btn-primary:hover { box-shadow: 0 8px 22px rgba(254, 84, 38, 0.5); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: #eef1f8;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- search / lookup (customer home) ---------- */
.search-hero {
    padding: 40px 22px;
    text-align: center;
    margin-top: 18px;
}
.search-hero .icon-badge {
    width: 64px; height: 64px; margin: 0 auto 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 10px 24px rgba(254,84,38,0.35);
}
.search-hero h2 { margin: 0 0 6px; font-size: 1.4rem; }
.search-hero p { color: var(--text-muted); margin: 0 0 26px; font-size: 0.92rem; }
.search-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.search-form input {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.search-form input::placeholder { color: var(--text-muted); text-transform: none; letter-spacing: normal; }
.search-form input:focus { outline: none; border-color: var(--orange); }

.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin: 18px 0;
    font-size: 0.92rem;
    border: 1px solid transparent;
}
.alert-error { background: rgba(228,63,63,0.12); border-color: rgba(228,63,63,0.4); color: #ffb3b3; }
.alert-success { background: rgba(31,170,89,0.12); border-color: rgba(31,170,89,0.4); color: #9df0bd; }
.alert-info { background: rgba(255,255,255,0.06); border-color: var(--border); color: #cfd6e6; }

/* ---------- product warranty card ---------- */
.product-card { padding: 26px 24px; margin-top: 22px; }

.product-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.product-top .product-img {
    width: 88px; height: 88px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.product-top .product-name {
    flex: 1;
    min-width: 140px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}
.product-top .product-purchase {
    text-align: right;
    flex-shrink: 0;
}
.product-top .product-purchase .label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.product-top .product-purchase .value { font-weight: 600; font-size: 0.98rem; }

.serial-pill {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
    letter-spacing: .5px;
}

/* progress section */
.progress-section { margin-top: 26px; }
.progress-dates {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.progress-dates .end-date { text-align: right; }
.progress-track {
    position: relative;
    height: 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.09);
    overflow: hidden;
    border: 1px solid var(--border);
}
.progress-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, var(--orange), #ff8a5c);
    transition: width .4s ease;
}
.progress-fill.expired { background: linear-gradient(90deg, #6b7280, #4b5563); }
.progress-countdown {
    text-align: center;
    margin-top: 14px;
}
.progress-countdown .days-num {
    font-size: 2rem;
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
}
.progress-countdown.expired .days-num { color: var(--text-muted); }
.progress-countdown .days-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.status-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .4px;
}
.status-active { background: rgba(31,170,89,0.15); color: #4fd684; }
.status-expired { background: rgba(228,63,63,0.15); color: #ff8080; }
.status-pending { background: rgba(242,169,59,0.15); color: #f2c163; }

/* description */
.section-block { margin-top: 30px; }
.section-block h3 {
    font-size: 1rem;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-block h3 .bar { width: 4px; height: 16px; background: var(--orange); border-radius: 3px; display: inline-block; }
.section-block .body-text {
    color: #cdd4e4;
    font-size: 0.92rem;
    line-height: 1.65;
}
.section-block .body-text ul { padding-left: 20px; margin: 0; }
.section-block .body-text li { margin-bottom: 6px; }

/* claim form */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}
.checkbox-tile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.checkbox-tile:has(input:checked) {
    border-color: var(--orange);
    background: rgba(254,84,38,0.12);
}
.checkbox-tile input { accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

input[type=text], input[type=tel], input[type=email], input[type=date],
input[type=number], input[type=password], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); }
textarea { resize: vertical; min-height: 90px; }

.field-error { color: #ff8f8f; font-size: 0.78rem; margin-top: 4px; }

/* ---------- admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border-right: 1px solid var(--border);
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.admin-sidebar .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 0 6px; }
.admin-sidebar .brand .brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }
.admin-sidebar .brand span { font-weight: 600; font-size: 0.95rem; }
.admin-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #c6cede;
    font-size: 0.88rem;
    margin-bottom: 4px;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); }
.admin-nav a.active { background: rgba(254,84,38,0.15); color: #ffb493; }
.admin-main { flex: 1; padding: 26px 30px 60px; max-width: 1200px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-topbar h1 { font-size: 1.3rem; margin: 0; }
.admin-topbar .user-pill { font-size: 0.82rem; color: var(--text-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { padding: 18px 20px; }
.stat-card .num { font-size: 1.7rem; font-weight: 700; }
.stat-card .lbl { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }

.data-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--radius); }
.data-table th, .data-table td {
    padding: 13px 14px;
    text-align: left;
    font-size: 0.86rem;
    border-bottom: 1px solid var(--border);
}
.data-table th { color: var(--text-muted); font-weight: 500; font-size: 0.76rem; text-transform: uppercase; letter-spacing: .4px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: rgba(255,255,255,0.08); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table-actions { display: flex; gap: 8px; }

.admin-card { padding: 24px; margin-bottom: 22px; }
.admin-card h2 { margin: 0 0 18px; font-size: 1.05rem; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { width: 100%; max-width: 370px; padding: 32px 28px; text-align: center; }
.login-box .icon-badge { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: linear-gradient(135deg, var(--orange), var(--orange-dark)); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.login-box h2 { margin: 0 0 22px; font-size: 1.2rem; }
.login-box form { text-align: left; }

.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.search-box-inline { display: flex; gap: 8px; }
.search-box-inline input { min-width: 220px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.badge-pending { background: rgba(242,169,59,0.15); color: #f2c163; }
.badge-in_review { background: rgba(79,152,255,0.15); color: #78adff; }
.badge-approved { background: rgba(31,170,89,0.15); color: #4fd684; }
.badge-rejected { background: rgba(228,63,63,0.15); color: #ff8080; }
.badge-resolved { background: rgba(148,163,184,0.15); color: #b7c0d1; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 2.2rem; margin-bottom: 10px; }

.footer-note { text-align: center; color: var(--text-muted); font-size: 0.76rem; margin-top: 40px; }

.image-preview-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.image-preview-wrap img { width: 70px; height: 70px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }

.claim-summary { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 0.85rem; margin-bottom: 10px; }
.claim-summary .row { display: flex; justify-content: space-between; padding: 4px 0; color: #cdd4e4; }
.claim-summary .row span:first-child { color: var(--text-muted); }

@media (max-width: 760px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; position: relative; }
    .admin-main { padding: 20px 16px 50px; }
    .product-top { flex-direction: column; text-align: center; }
    .product-top .product-purchase { text-align: center; }
    .product-top .product-name { order: -1; }
}
