/* Flowersstore — Account pages (profile, orders, change-password) */

/* ── Page wrapper ─────────────────────────────────────────── */

.flr-account {
    min-height: 100vh;
    background: var(--theme-bg, #fbf6ee);
    padding: calc(var(--theme-header-height, 90px) + var(--theme-stripe-height, 40px) + 4rem) var(--theme-gutter, 24px) 5rem;
    box-sizing: border-box;
    width: 100%;
}

/* ── Layout grid ──────────────────────────────────────────── */

.t1-account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 900px) {
    .t1-account-grid {
        grid-template-columns: 260px 1fr;
        gap: 2rem;
        align-items: start;
    }
}

/* ── Sidebar ──────────────────────────────────────────────── */

.flr-account-sidebar {
    background: var(--theme-surface, #fff9f2);
    border-radius: var(--theme-radius-lg, 10px);
    border: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    padding: 1.5rem;
    box-shadow: 0 4px 24px color-mix(in srgb, var(--theme-espresso, #4a3a30) 8%, transparent);
    position: sticky;
    top: calc(var(--theme-header-height, 90px) + var(--theme-stripe-height, 40px) + 1rem);
}

/* ── User block ───────────────────────────────────────────── */

.flr-account-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    margin-bottom: 1rem;
}

.flr-account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--theme-primary) 15%, var(--theme-surface-raised, #f7e9e4));
    color: var(--theme-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.t1-account-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.flr-account-name {
    font-family: var(--theme-font-family);
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--theme-text, #2a2320);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flr-account-email {
    font-family: var(--theme-font-family);
    font-size: 0.8rem;
    color: var(--theme-text-muted, #726a62);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Sidebar nav ──────────────────────────────────────────── */

.flr-account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.flr-account-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--theme-radius-lg, 10px);
    font-family: var(--theme-font-family);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-text, #2a2320);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.flr-account-nav-link svg {
    flex-shrink: 0;
    color: var(--theme-primary);
    transition: color 0.15s;
}

.flr-account-nav-link:hover {
    background: color-mix(in srgb, var(--theme-primary) 8%, transparent);
    color: var(--theme-primary);
}

.flr-account-nav-link.is-active {
    background: color-mix(in srgb, var(--theme-primary) 12%, transparent);
    color: var(--theme-primary);
}

.flr-account-nav-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
}

.flr-account-logout {
    color: #dc2626 !important;
}

.flr-account-logout svg {
    color: #dc2626 !important;
}

.flr-account-logout:hover {
    background: color-mix(in srgb, #dc2626 10%, transparent) !important;
    color: #dc2626 !important;
}

/* ── Content card ─────────────────────────────────────────── */

.t1-account-content { min-width: 0; }

.flr-account-card {
    background: var(--theme-surface, #fff9f2);
    border-radius: var(--theme-radius-lg, 10px);
    border: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    padding: 2rem 2.25rem;
    box-shadow: 0 4px 24px color-mix(in srgb, var(--theme-espresso, #4a3a30) 8%, transparent);
}

/* ── Card header ──────────────────────────────────────────── */

.flr-account-card-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
}

.flr-account-card-title {
    font-family: var(--theme-font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 400;
    color: var(--theme-text, #2a2320);
    margin: 0 0 0.35rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.flr-account-card-subtitle {
    font-family: var(--theme-font-family);
    font-size: 0.9375rem;
    color: var(--theme-text-muted, #726a62);
    margin: 0;
}

/* ── Form ─────────────────────────────────────────────────── */

.flr-account-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.flr-account-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.flr-account-label {
    font-family: var(--theme-font-family);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--theme-text, #2a2320);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

/* ── Inputs ───────────────────────────────────────────────── */

.flr-account .t1-auth-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--theme-surface-raised, #f7e9e4);
    border: 1.5px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    border-radius: var(--theme-radius-lg, 10px);
    font-size: 0.9375rem;
    color: var(--theme-text, #2a2320);
    font-family: var(--theme-font-family);
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.flr-account .t1-auth-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    background: var(--theme-surface, #fff9f2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-primary) 15%, transparent);
}

.flr-account .t1-auth-input::placeholder {
    color: var(--theme-text-faint, #c6b8ac);
}

.flr-account .t1-profile-input-readonly {
    background: var(--theme-surface-raised, #f7e9e4) !important;
    color: var(--theme-text-muted, #726a62) !important;
    cursor: not-allowed;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ── Divider ──────────────────────────────────────────────── */

.flr-account-divider {
    height: 1px;
    background: var(--theme-border, rgba(74, 58, 48, 0.14));
    margin: 0.25rem 0;
}

/* ── Submit button ────────────────────────────────────────── */

.flr-account .t1-auth-btn,
.flr-account-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--theme-primary);
    color: var(--theme-surface, #fff9f2);
    font-family: var(--theme-font-family);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--theme-primary) 28%, transparent);
    align-self: flex-start;
    width: auto !important;
}

.flr-account .t1-auth-btn:disabled,
.flr-account-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.flr-account .t1-auth-btn:hover,
.flr-account-btn:hover {
    background: var(--theme-primary-hover, #8a6450);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--theme-primary) 34%, transparent);
}

.flr-account .t1-auth-btn:active,
.flr-account-btn:active { transform: translateY(0); }

/* ── Error / success banners ──────────────────────────────── */

.flr-account-error,
.flr-account .t1-auth-error {
    background: color-mix(in srgb, #dc2626 10%, transparent);
    border: 1px solid color-mix(in srgb, #dc2626 28%, transparent);
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: var(--theme-radius-lg, 10px);
    font-size: 0.875rem;
    font-family: var(--theme-font-family);
    margin-bottom: 0.5rem;
}

.flr-account-message,
.flr-account .t1-auth-message {
    background: color-mix(in srgb, var(--theme-primary) 8%, var(--theme-surface, #fff9f2));
    border: 1px solid color-mix(in srgb, var(--theme-primary) 22%, transparent);
    color: color-mix(in srgb, var(--theme-primary) 80%, var(--theme-text, #2a2320));
    padding: 0.75rem 1rem;
    border-radius: var(--theme-radius-lg, 10px);
    font-size: 0.875rem;
    font-family: var(--theme-font-family);
    margin-bottom: 0.5rem;
}

/* ── Orders table ─────────────────────────────────────────── */

.flr-orders-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.flr-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--theme-font-family);
    font-size: 0.875rem;
}

.flr-orders-table thead tr {
    border-bottom: 2px solid var(--theme-border, rgba(74, 58, 48, 0.14));
}

.flr-orders-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-text-muted, #726a62);
    white-space: nowrap;
}

.flr-orders-table td {
    padding: 1rem;
    color: var(--theme-text, #2a2320);
    border-bottom: 1px solid var(--theme-border, rgba(74, 58, 48, 0.08));
    vertical-align: middle;
}

.flr-orders-table tbody tr:last-child td { border-bottom: none; }

.flr-orders-table tbody tr:hover td {
    background: color-mix(in srgb, var(--theme-primary) 4%, transparent);
}

/* ── Order status pill ────────────────────────────────────── */

.flr-order-status {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--theme-primary) 12%, transparent);
    color: var(--theme-primary);
}

/* ── Order view link ──────────────────────────────────────── */

.flr-order-view {
    font-family: var(--theme-font-family);
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--theme-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: opacity 0.15s;
}
.flr-order-view:hover { opacity: 0.72; text-decoration: underline; }

/* ── Orders empty state ───────────────────────────────────── */

.flr-orders-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    font-family: var(--theme-font-family);
}

.flr-orders-empty-icon {
    color: var(--theme-text-faint, #c6b8ac);
    margin-bottom: 1rem;
}

.flr-orders-empty p {
    font-size: 1rem;
    color: var(--theme-text-muted, #726a62);
    margin: 0 0 1rem;
}

.flr-orders-empty-cta {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--theme-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.flr-orders-empty-cta:hover { text-decoration: underline; }

/* ── Orders pagination ────────────────────────────────────── */

.flr-orders-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.flr-orders-pagination[hidden] { display: none !important; }

.flr-orders-page-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    background: var(--theme-surface, #fff9f2);
    color: var(--theme-text, #2a2320);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.flr-orders-page-btn:hover {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-surface, #fff9f2);
}

.flr-orders-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.flr-orders-page-info {
    font-family: var(--theme-font-family);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--theme-text-muted, #726a62);
}

/* ── Order detail modal ───────────────────────────────────── */

.flr-order-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.flr-order-modal[hidden] { display: none; }

.t1-order-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}

.flr-order-modal-panel {
    position: relative;
    background: var(--theme-surface, #fff9f2);
    border-radius: var(--theme-radius-lg, 10px);
    border: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    padding: 2rem;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.flr-order-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    background: var(--theme-surface-raised, #f7e9e4);
    color: var(--theme-text, #2a2320);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.flr-order-modal-close:hover {
    background: var(--theme-primary);
    color: var(--theme-surface, #fff9f2);
    border-color: var(--theme-primary);
}

.flr-order-modal-title {
    font-family: var(--theme-font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--theme-text, #2a2320);
    margin: 0 0 1.25rem;
    padding-right: 2rem;
    letter-spacing: -0.01em;
}

.flr-order-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    font-family: var(--theme-font-family);
    font-size: 0.875rem;
}

.flr-order-modal-grid > div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.flr-order-modal-grid strong {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-text-muted, #726a62);
}

.flr-order-modal-grid span {
    color: var(--theme-text, #2a2320);
    font-weight: 500;
}

.t1-order-modal__section {
    border-top: 1px solid var(--theme-border, rgba(74, 58, 48, 0.14));
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.t1-order-modal__section h4 {
    font-family: var(--theme-font-family);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-text-muted, #726a62);
    margin: 0 0 0.75rem;
}

.t1-order-modal__list {
    font-family: var(--theme-font-family);
    font-size: 0.875rem;
    color: var(--theme-text, #2a2320);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 599px) {
    .flr-account {
        padding-top: calc(var(--theme-header-height, 90px) + var(--theme-stripe-height, 40px) + 2rem);
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .flr-account-card {
        padding: 1.5rem 1.25rem;
    }

    .flr-order-modal-panel {
        padding: 1.5rem 1.25rem;
    }

    .flr-order-modal-grid {
        grid-template-columns: 1fr;
    }

    .flr-orders-table th,
    .flr-orders-table td {
        padding: 0.65rem 0.6rem;
    }
}

@media (max-width: 899px) {
    .flr-account-sidebar {
        position: static;
    }
}
