/* ============================================================
   account.css — Auth pages + customer account area
   ============================================================ */

/* ---------- Auth pages ---------- */
.auth-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: clamp(2rem, 6vw, 4rem);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.6rem, 4vw, 2.5rem);
    box-shadow: 0 18px 45px rgba(43, 43, 43, 0.06);
}

.auth-card--wide { max-width: 560px; }

.auth-card__head {
    text-align: center;
    margin-bottom: 1.6rem;
}

.auth-card__eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 0.4rem;
}

.auth-card__head h1 {
    margin-bottom: 0.5rem;
}

.auth-card__head p {
    color: var(--color-muted);
    font-size: 0.92rem;
}

.auth-card .form-group { margin-bottom: 1.1rem; }
.auth-card .form-label { margin-bottom: 0.45rem; }

.auth-card__actions {
    margin-top: 1.4rem;
}

.auth-card__actions .btn { width: 100%; }

.auth-card__alt {
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-muted);
}

.auth-card__alt a {
    color: var(--color-burgundy);
    text-decoration: underline;
    font-weight: 600;
}

.auth-card__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-sand);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-block: 1.3rem;
}

.auth-card__divider::before,
.auth-card__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-card__terms {
    font-size: 0.82rem;
    color: var(--color-muted);
    line-height: 1.6;
}

.auth-card__terms a { text-decoration: underline; color: var(--color-burgundy); }

.btn--link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--color-burgundy);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition), gap var(--transition);
}

.btn--link:hover { color: var(--color-ink); gap: 12px; }

.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-block: 0.4rem 1rem;
}

.form-link {
    font-size: 0.88rem;
    color: var(--color-burgundy);
    text-decoration: underline;
}

.form-link:hover { color: var(--color-ink); }

.auth-help {
    text-align: center;
    margin-top: 1.1rem;
    padding: 1rem;
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-all;
}

/* ---------- Account layout ---------- */
.account-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: clamp(22px, 3vw, 36px);
    align-items: start;
    padding-block: clamp(1.6rem, 3vw, 2.5rem);
}

.account-nav {
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 0.6rem;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.account-nav__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.3rem 0.6rem 1rem;
    margin-bottom: 0.6rem;
    border-bottom: 1px solid var(--color-border);
}

.account-nav__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--color-ivory);
    background: linear-gradient(135deg, var(--color-burgundy), #7a363b);
    flex: 0 0 auto;
}

.account-nav__user small {
    display: block;
    color: var(--color-muted);
    font-size: 0.76rem;
    margin-top: 0.1rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-nav__title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-sand);
    padding: 0.3rem 1rem 0.7rem;
}

.account-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 1rem;
    font-size: 0.92rem;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background-color var(--transition), color var(--transition);
}

.account-nav a:hover { background: var(--color-cream); color: var(--color-burgundy); }

.account-nav a.is-active {
    background: var(--color-burgundy);
    color: var(--color-ivory);
    font-weight: 600;
}

.account-nav a i { width: 18px; text-align: center; font-size: 0.9rem; }

.account-nav__count {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding-inline: 0.4rem;
    border-radius: 999px;
    background: var(--color-gold);
    color: #201d19;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    display: inline-block;
}

.account-nav__signout {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--color-border);
}

.account-nav__signout .btn--link {
    width: 100%;
    justify-content: flex-start;
    color: var(--color-muted);
}

.account-nav__signout .btn--link:hover { color: var(--color-burgundy); }

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

.account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 1.6rem;
}

.account-head h1 { margin-bottom: 0.25rem; }

.account-head p { color: var(--color-muted); font-size: 0.92rem; }

/* ---------- Stats ---------- */
.account-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 1.8rem;
}

.account-stat {
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.1rem;
}

.account-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-cream);
    color: var(--color-burgundy);
    margin-bottom: 0.7rem;
}

.account-stat__value {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.1;
}

.account-stat__label {
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

/* ---------- Panels / cards ---------- */
.account-panel {
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.4rem 1.5rem;
    margin-bottom: 1.4rem;
}

.account-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 0.9rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.account-panel__head h2 { margin: 0; }

/* ---------- Order list ---------- */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    background: var(--color-white-warm);
    transition: border-color var(--transition), transform var(--transition);
}

.order-row:hover {
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

.order-row__num {
    font-family: var(--font-serif);
    font-size: 1.02rem;
}

.order-row__meta {
    font-size: 0.82rem;
    color: var(--color-muted);
    margin-top: 0.2rem;
}

.order-row__total {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-burgundy);
    text-align: right;
}

.order-row__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---------- Quick links ---------- */
.account-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.account-quicklink {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    transition: border-color var(--transition), transform var(--transition);
}

.account-quicklink:hover {
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

.account-quicklink i {
    font-size: 1.2rem;
    color: var(--color-burgundy);
    margin-bottom: 0.5rem;
}

.account-quicklink span { font-weight: 600; font-size: 0.92rem; }

.account-quicklink small { color: var(--color-muted); font-size: 0.78rem; }

/* ---------- Status badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
}

.badge--pending     { color: #8a6d1a; background: rgba(214, 177, 66, 0.14); }
.badge--confirmed   { color: #2f6b47; background: rgba(47, 107, 71, 0.12); }
.badge--processing  { color: #8a6d1a; background: rgba(214, 177, 66, 0.14); }
.badge--shipped     { color: #2b5e8c; background: rgba(43, 94, 140, 0.12); }
.badge--delivered   { color: #2f6b47; background: rgba(47, 107, 71, 0.12); }
.badge--completed   { color: #2f6b47; background: rgba(47, 107, 71, 0.12); }
.badge--cancelled   { color: var(--color-burgundy); background: rgba(128, 47, 51, 0.1); }
.badge--paid        { color: #2f6b47; background: rgba(47, 107, 71, 0.12); }
.badge--refunded    { color: #8a6d1a; background: rgba(214, 177, 66, 0.14); }
.badge--failed      { color: var(--color-burgundy); background: rgba(128, 47, 51, 0.1); }

/* ---------- Messages ---------- */
.account-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.account-messages__intro {
    color: var(--color-muted);
    font-size: 0.88rem;
}

.account-message {
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(43, 43, 43, 0.05);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    animation: msgFadeUp 0.4s ease both;
}

.account-message:nth-child(2)  { animation-delay: 0.04s; }
.account-message:nth-child(3)  { animation-delay: 0.08s; }
.account-message:nth-child(4)  { animation-delay: 0.12s; }
.account-message:nth-child(n+5){ animation-delay: 0.16s; }

.account-message:hover {
    border-color: var(--color-gold);
    box-shadow: 0 14px 34px rgba(43, 43, 43, 0.1);
    transform: translateY(-2px);
}

.account-message__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 1.05rem 1.3rem;
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(180deg, rgba(201, 168, 106, 0.07), rgba(201, 168, 106, 0.01));
}

.account-message__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-cream);
    color: var(--color-burgundy);
    font-size: 1.05rem;
    border: 1px solid var(--color-border);
}

.account-message__icon--replied     { background: #e5f1ea; color: #2f6b47; }
.account-message__icon--underreview { background: #e8eef4; color: #2b5e8c; }

.account-message__titles {
    min-width: 0;
    flex: 1 1 auto;
}

.account-message__subject {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-ink);
    overflow-wrap: anywhere;
}

.account-message__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.32rem;
    font-size: 0.78rem;
    color: var(--color-muted);
}

.account-message__meta i {
    font-size: 0.72rem;
    color: var(--color-gold);
}

.account-message__status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.34rem 0.82rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.account-message__status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status--awaiting    { color: #8a6d1a; background: rgba(214, 177, 66, 0.14); }
.status--underreview { color: #2b5e8c; background: rgba(43, 94, 140, 0.12); }
.status--replied     { color: #2f6b47; background: rgba(47, 107, 71, 0.12); }

.account-message__body {
    padding: 1.15rem 1.3rem 1.05rem;
    border-bottom: 1px solid var(--color-border);
}

.account-message__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.55rem;
}

.account-message__label i { color: var(--color-gold); }

.account-message__text {
    margin: 0;
    font-size: 0.94rem;
    color: var(--color-text);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.account-message__reply {
    background: rgba(201, 168, 106, 0.08);
    padding: 1.1rem 1.3rem 1.2rem;
}

.account-message__reply-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.65rem;
}

.account-message__sc {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-gold), #a98848);
    color: var(--color-ivory);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.account-message__reply-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.account-message__reply-title strong {
    font-size: 0.92rem;
    color: var(--color-ink);
}

.account-message__reply-title span {
    font-size: 0.76rem;
    color: var(--color-muted);
}

.account-message__reply-text {
    margin: 0;
    padding-left: 14px;
    border-left: 2px solid var(--color-gold);
    margin-left: 6px;
    font-size: 0.94rem;
    color: var(--color-ink);
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.account-message__reply--self {
    background: rgba(122, 36, 48, 0.05);
    margin-top: 0.5rem;
}

.account-message__reply--self .account-message__sc--self {
    background: linear-gradient(135deg, var(--color-burgundy), #5a1720);
}

.account-message__reply--self .account-message__reply-text {
    border-left-color: var(--color-burgundy);
}

.account-message__reply-form {
    margin-top: 0.85rem;
    border-top: 1px dashed var(--color-border);
    padding-top: 0.85rem;
}

.account-message__reply-toggle {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-burgundy);
    list-style: none;
    user-select: none;
}

.account-message__reply-toggle::-webkit-details-marker { display: none; }
.account-message__reply-toggle::before {
    content: '\f075';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.5rem;
}

.account-message__reply-form[open] .account-message__reply-toggle::before {
    content: '\f078';
}

.account-message__reply-form form {
    margin-top: 0.9rem;
}

@keyframes msgFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .account-message { animation: none; }
    .account-message:hover { transform: none; }
}

/* ---------- Order detail ---------- */
.order-detail__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 1.4rem;
}

.order-detail__meta-item {
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
}

.order-detail__meta-item dt {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.3rem;
}

.order-detail__meta-item dd {
    font-weight: 600;
    font-size: 0.95rem;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-muted);
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.9rem 0.8rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.order-item__img {
    width: 56px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 0 0 auto;
    background: var(--color-cream);
}

.order-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item__name {
    font-weight: 600;
}

.order-item__variant {
    font-size: 0.78rem;
    color: var(--color-muted);
    margin-top: 0.15rem;
}

.order-totals {
    margin-left: auto;
    width: min(100%, 320px);
    margin-top: 1rem;
}

.order-totals__row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-block: 0.45rem;
    font-size: 0.92rem;
}

.order-totals__row--total {
    border-top: 1px solid var(--color-border);
    margin-top: 0.4rem;
    padding-top: 0.8rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--color-burgundy);
}

.address-block {
    background: var(--color-cream);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    line-height: 1.7;
    font-size: 0.92rem;
}

/* ---------- Profile form grid ---------- */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Support / Messaging System
   ============================================================ */

/* ---------- Status badges ---------- */
.support-badge, .convo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.22rem 0.6rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.support-badge--open, .convo-badge--open       { color: #8a6d1a; background: rgba(214, 177, 66, 0.14); }
.support-badge--waiting, .convo-badge--waiting { color: #b35c00; background: rgba(179, 92, 0, 0.1); }
.support-badge--awaiting, .convo-badge--awaiting { color: #2b5e8c; background: rgba(43, 94, 140, 0.12); }
.support-badge--resolved, .convo-badge--resolved { color: #2f6b47; background: rgba(47, 107, 71, 0.12); }
.support-badge--closed, .convo-badge--closed   { color: var(--color-muted); background: rgba(141, 133, 120, 0.12); }

/* ---------- Account page header ---------- */
.account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

/* ---------- Conversation list ---------- */
.convo-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.convo-row {
    position: relative;
    display: block;
    padding: 1.1rem 1.3rem;
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    animation: msgFadeUp 0.35s ease both;
}

.convo-row:nth-child(2) { animation-delay: 0.03s; }
.convo-row:nth-child(3) { animation-delay: 0.06s; }
.convo-row:nth-child(4) { animation-delay: 0.09s; }
.convo-row:nth-child(n+5) { animation-delay: 0.12s; }

.convo-row:hover {
    border-color: var(--color-gold);
    box-shadow: 0 10px 28px rgba(43, 43, 43, 0.09);
    transform: translateY(-1px);
}

.convo-row--unread {
    border-color: rgba(122, 36, 48, 0.35);
    background: linear-gradient(180deg, var(--color-white-warm), #fffaf3);
}

.convo-row--unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--color-burgundy);
}

.convo-row__unread-dot {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-burgundy);
    box-shadow: 0 0 0 3px rgba(122, 36, 48, 0.12);
}

.convo-row__body { min-width: 0; }

.convo-row__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding-right: 1.25rem;
}

.convo-row__subject {
    font-family: var(--font-serif);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--color-ink);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.convo-row--unread .convo-row__subject { color: var(--color-burgundy); }

.convo-row__time {
    font-size: 0.74rem;
    color: var(--color-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.convo-row__preview {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0.4rem 0 0.7rem;
}

.convo-row__meta {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.convo-row__ticket {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.05em;
}

/* ---------- Conversation detail ---------- */
.conv-top {
    margin-bottom: 1.5rem;
}

.conv-back {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-muted);
    text-decoration: none;
    margin-bottom: 0.9rem;
    transition: color 0.15s;
}

.conv-back:hover { color: var(--color-burgundy); }

.conv-top__subject {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.4vw, 1.5rem);
    font-weight: 600;
    color: var(--color-ink);
    margin: 0;
}

.conv-top__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.45rem;
}

/* ---------- Order context card ---------- */
.conv-order {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    background: linear-gradient(180deg, rgba(201, 168, 106, 0.08), rgba(201, 168, 106, 0.02));
    border: 1px solid rgba(201, 168, 106, 0.25);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.15rem;
    margin-bottom: 1.5rem;
}

.conv-order__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white-warm);
    color: var(--color-gold);
    border: 1px solid rgba(201, 168, 106, 0.3);
    flex-shrink: 0;
}

.conv-order__num {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--color-ink);
}

.conv-order__items {
    flex: 1 1 100%;
    font-size: 0.84rem;
    color: var(--color-muted);
    line-height: 1.5;
}

.conv-order__total {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-burgundy);
    margin-left: auto;
}

/* ---------- Thread ---------- */
.conv-thread {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-bottom: 1.5rem;
}

.conv-date {
    text-align: center;
    position: relative;
    margin: 0.4rem 0 0.1rem;
}

.conv-date span {
    background: var(--color-ivory);
    padding: 0 0.8rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.conv-date::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--color-border);
}

.conv-system {
    align-self: center;
    font-size: 0.76rem;
    color: var(--color-muted);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
}

/* ---------- Messages ---------- */
.conv-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    max-width: 78%;
}

.conv-msg--customer { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.conv-msg--admin    { align-self: flex-start; }

.conv-msg__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.conv-msg--customer .conv-msg__meta { align-items: center; }

.conv-msg__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.conv-msg__avatar--admin {
    background: linear-gradient(135deg, var(--color-gold), #a98848);
    color: var(--color-ivory);
    font-family: var(--font-serif);
    box-shadow: 0 2px 8px rgba(201, 168, 106, 0.35);
}

.conv-msg__avatar--customer {
    background: linear-gradient(135deg, var(--color-burgundy), #5a1720);
    color: #fff;
    box-shadow: 0 2px 8px rgba(122, 36, 48, 0.25);
}

.conv-msg__who {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05rem;
    font-size: 0.62rem;
    color: var(--color-muted);
}

.conv-msg--customer .conv-msg__who { align-items: center; }

.conv-msg__who strong {
    font-size: 0.72rem;
    color: var(--color-ink);
}

.conv-msg__bubble {
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.7;
    text-align: left;
}

.conv-msg--customer .conv-msg__bubble {
    background: var(--color-burgundy);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.conv-msg--admin .conv-msg__bubble {
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 10px rgba(43, 43, 43, 0.05);
}

.conv-msg__text {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.conv-msg--customer .conv-msg__text { color: #fff; }

.conv-msg--customer .conv-msg__bubble .conv-msg__when,
.conv-msg--admin .conv-msg__bubble .conv-msg__when { display: none; }

/* ---------- Files in messages ---------- */
.conv-msg__files {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(232, 225, 212, 0.5);
}

.conv-msg--customer .conv-msg__files { border-top-color: rgba(255, 255, 255, 0.25); }

.conv-file {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    background: rgba(201, 168, 106, 0.1);
    color: var(--color-gold);
    text-decoration: none;
    transition: background 0.15s;
}

.conv-file:hover { background: rgba(201, 168, 106, 0.2); }

.conv-msg--customer .conv-file {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.conv-msg--customer .conv-file:hover { background: rgba(255, 255, 255, 0.25); }

.conv-file__name {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-file__size {
    font-size: 0.72rem;
    opacity: 0.7;
}

/* ---------- Reply form ---------- */
.conv-reply {
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    box-shadow: 0 4px 16px rgba(43, 43, 43, 0.05);
}

.conv-reply__textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    min-height: 60px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.conv-reply__textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.12);
}

.conv-reply__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.conv-attach {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--color-muted);
    font-size: 0.82rem;
    padding: 0.4rem 0.6rem;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    transition: all 0.15s;
    max-width: 60%;
}

.conv-attach:hover {
    color: var(--color-gold);
    border-color: var(--color-gold);
}

.conv-attach span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Closed notice ---------- */
.conv-closed {
    text-align: center;
    padding: 1rem;
    background: var(--color-cream);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    color: var(--color-muted);
}

.conv-closed i { margin-right: 0.4rem; }

/* ---------- Guest confirmation ---------- */
.support-confirm {
    display: flex;
    justify-content: center;
    padding-block: clamp(2rem, 6vw, 4rem);
}

.support-confirm__card {
    max-width: 480px;
    text-align: center;
    background: var(--color-white-warm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(1.8rem, 4vw, 2.8rem);
    box-shadow: 0 18px 45px rgba(43, 43, 43, 0.06);
}

.support-confirm__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(47, 107, 71, 0.1);
    color: var(--color-success);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.support-confirm__ticket {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-gold);
    letter-spacing: 0.06em;
    margin: 0.5rem 0;
}

.support-confirm__note {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}

/* ---------- New message form ---------- */
.support-new {
    max-width: 640px;
}

.support-new .conv-reply__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

/* ---------- Form hint ---------- */
.form-hint {
    font-weight: 400;
    color: var(--color-muted);
    font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .conv-msg { max-width: 92%; }
    .conv-msg__who { display: none; }
    .conv-order__total { margin-left: 0; }
    .convo-row__top { padding-right: 1.5rem; }
}
