/* =========================================================
   UFS Communication Customer Account CSS
   Light responsive account UI
========================================================= */

:root {
    --primary: #fc3237;
    --primary-dark: #d92228;
    --secondary: #678a56;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --light: #f7f8fb;
    --white: #ffffff;
    --soft-red: #fff0f1;
    --soft-green: #f0f8ed;
    --danger: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--light);
    color: var(--text);
    padding-bottom: 88px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(252, 50, 55, .16), transparent 34%),
        radial-gradient(circle at bottom left, rgba(103, 138, 86, .16), transparent 34%),
        var(--light);
}

.auth-card {
    width: min(480px, 100%);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: clamp(22px, 5vw, 34px);
    box-shadow: var(--shadow);
}

.auth-brand,
.account-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-brand span,
.account-logo span {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    display: grid;
    place-items: center;
    font-weight: 950;
}

.auth-card h1 {
    margin: 22px 0 8px;
    font-size: clamp(30px, 5vw, 42px);
    letter-spacing: -.05em;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.form-box,
.form-grid {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .form-divider,
.form-grid .check-row,
.form-grid button {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 900;
    font-size: 14px;
}

input,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 13px 14px;
    background: var(--white);
    color: var(--text);
    outline: none;
}

input:focus,
select:focus {
    border-color: rgba(252, 50, 55, .45);
    box-shadow: 0 0 0 4px rgba(252, 50, 55, .08);
}

.btn-primary,
.btn-light,
.btn-danger {
    min-height: 44px;
    border-radius: 14px;
    border: 0;
    font-weight: 950;
    cursor: pointer;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 12px 28px rgba(252,50,55,.18);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-light {
    background: var(--soft-red);
    color: var(--primary);
    border: 1px solid rgba(252,50,55,.18);
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.auth-switch,
.auth-links {
    margin: 18px 0 0;
    text-align: center;
}

.auth-switch a,
.auth-links a,
.panel-head a {
    color: var(--primary);
    font-weight: 950;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.alert {
    border-radius: 18px;
    padding: 12px 14px;
    margin: 16px 0;
}

.alert p {
    margin: 4px 0;
    line-height: 1.5;
    font-weight: 700;
}

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

.alert-success {
    background: var(--soft-green);
    color: #315f25;
    border: 1px solid #d9efcf;
}

.account-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 12px max(16px, calc((100vw - 1200px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.account-header nav {
    display: flex;
    gap: 10px;
}

.account-header nav a {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
}

.account-layout {
    width: min(1200px, calc(100% - 32px));
    margin: 24px auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.account-sidebar,
.panel,
.welcome-card,
.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15,23,42,.05);
}

.account-sidebar {
    position: sticky;
    top: 88px;
    padding: 16px;
    display: grid;
    gap: 8px;
}

.profile-mini {
    text-align: center;
    padding: 12px 8px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 30px;
    font-weight: 950;
}

.profile-mini strong,
.profile-mini span {
    display: block;
}

.profile-mini span {
    color: var(--muted);
    margin-top: 4px;
}

.account-sidebar a {
    padding: 13px 14px;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 900;
}

.account-sidebar a.active,
.account-sidebar a:hover {
    background: var(--soft-red);
    color: var(--primary);
}

.account-content {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.welcome-card {
    padding: clamp(22px, 4vw, 34px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    color: var(--primary);
    background: var(--soft-red);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.welcome-card h1,
.panel h1 {
    margin: 10px 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -.05em;
}

.welcome-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.panel {
    padding: 20px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.panel-head h1,
.panel-head h2 {
    margin: 0;
}

.panel p {
    color: var(--muted);
    line-height: 1.7;
}

.form-divider {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-weight: 950;
    color: var(--primary);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-row input {
    width: auto;
}

.orders-table-wrap {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.orders-table th,
.orders-table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
}

.orders-table th {
    color: var(--muted);
    font-size: 13px;
}

.badge {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    background: var(--soft-green);
    color: var(--secondary);
    font-size: 12px;
    font-weight: 950;
}

.badge-soft {
    background: var(--soft-red);
    color: var(--primary);
}

.empty-box {
    background: var(--light);
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 18px;
}

.address-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.address-card {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
}

.address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.address-card p {
    margin: 7px 0;
}

.address-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.address-actions form {
    margin: 0;
}

.mobile-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 70;
    width: min(560px, calc(100% - 22px));
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(15,23,42,.14);
    border-radius: 22px;
    padding: 8px;
    display: none;
    grid-template-columns: repeat(5, 1fr);
}

.mobile-bottom-nav a {
    padding: 10px 4px;
    text-align: center;
    border-radius: 16px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.mobile-bottom-nav a.active {
    background: var(--soft-red);
    color: var(--primary);
}

@media (max-width: 980px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
        grid-template-columns: repeat(4, 1fr);
    }

    .profile-mini {
        grid-column: 1 / -1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .account-header nav {
        display: none;
    }

    .account-layout {
        width: min(100% - 24px, 1200px);
    }

    .account-sidebar {
        display: none;
    }

    .welcome-card,
    .grid-two,
    .form-grid,
    .address-grid {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card strong {
        font-size: 22px;
    }

    .auth-links {
        flex-direction: column;
    }

    .mobile-bottom-nav {
        display: grid;
    }
}

@media (max-width: 420px) {
    .auth-wrap {
        padding: 14px;
    }

    .auth-card,
    .panel,
    .welcome-card,
    .stat-card {
        border-radius: 20px;
    }
}
