﻿/* ============================================
   Account pages — theme-matched
   Reuses tokens from checkout.css / cart.css / compare.css
   ============================================ */
.ac-section { padding-top: 30px; padding-bottom: 60px; }

/* Page head */
.ac-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ac-page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--ck-dark);
}

.ac-page-sub {
    margin: 6px 0 0;
    color: var(--ck-grey);
    font-size: 14px;
}

.ac-page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Layout */
.ac-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .ac-layout { grid-template-columns: 1fr; }
    .ac-sidebar { order: -1; }
}

/* SIDEBAR */
.ac-sidebar {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 900px) {
    .ac-sidebar { position: static; }
}

/* Profile card */
.ac-profile-card {
    background: var(--ck-dark);
    color: #ffffff;
    border-radius: 4px;
    padding: 22px 20px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.ac-profile-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ac-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--ck-primary);
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.ac-profile-meta { min-width: 0; }

.ac-profile-name {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-profile-email {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ac-quick-stats {
    list-style: none;
    margin: 18px 0 14px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ac-quick-stats li { display: flex; flex-direction: column; gap: 2px; }
.ac-quick-stats li strong { font-size: 17px; font-weight: 700; color: #ffffff; }
.ac-quick-stats li span { font-size: 11px; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 0.5px; }

.ac-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ac-logout:hover {
    background: var(--ck-primary);
    border-color: var(--ck-primary);
    color: #ffffff;
}

/* Nav */
.ac-nav {
    background: #ffffff;
    border: 1px solid var(--ck-border);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    color: var(--ck-body);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.ac-nav-item i { width: 18px; text-align: center; color: var(--ck-grey); font-size: 14px; }
.ac-nav-item:hover { background: var(--ck-surface); color: var(--ck-dark); }

.ac-nav-item.is-active {
    background: var(--ck-primary);
    color: #ffffff;
}
.ac-nav-item.is-active i { color: #ffffff; }

.ac-nav-count {
    margin-left: auto;
    background: var(--ck-surface);
    color: var(--ck-body);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.ac-nav-item.is-active .ac-nav-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* MAIN */
.ac-main { min-width: 0; }

/* Profile grid */
.ac-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
}

@media (max-width: 600px) {
    .ac-profile-grid { grid-template-columns: 1fr; }
}

.ac-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    background: var(--ck-surface);
    border-radius: 4px;
    border: 1px solid var(--ck-border);
}

.ac-info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ck-grey);
    font-weight: 700;
}

.ac-info-value {
    font-size: 14px;
    color: var(--ck-dark);
    font-weight: 600;
}

/* Quick actions grid */
.ac-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.ac-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 22px 16px;
    background: var(--ck-surface);
    border: 1px solid var(--ck-border);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ac-action:hover {
    border-color: var(--ck-primary);
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    color: inherit;
}

.ac-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--ck-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ck-grey);
    font-size: 18px;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ac-action:hover .ac-action-icon {
    color: var(--ck-primary);
    border-color: var(--ck-primary);
}

.ac-action-name {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ck-dark);
}

.ac-action-sub {
    font-size: 11px;
    color: var(--ck-grey);
    line-height: 1.3;
}

/* Order list (compact dashboard rows) */
.ac-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ac-order-list li { margin: 0; }

.ac-order {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 2fr auto auto 20px;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--ck-border);
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ac-order:hover {
    border-color: var(--ck-primary);
    background: rgba(209, 0, 36, 0.02);
    color: inherit;
}

.ac-order:active { transform: scale(0.998); }

.ac-order-id { display: flex; flex-direction: column; gap: 2px; }
.ac-order-num { font-weight: 700; color: var(--ck-dark); font-size: 14px; }
.ac-order-date { font-size: 11px; color: var(--ck-grey); }

.ac-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--ck-grey);
    font-size: 12px;
}

.ac-order-meta i { color: var(--ck-primary); margin-right: 4px; font-size: 11px; }

.ac-order-total {
    font-weight: 700;
    color: var(--ck-primary);
    font-size: 15px;
    white-space: nowrap;
}

.ac-order-arrow {
    color: var(--ck-grey);
    font-size: 12px;
}

.ac-order:hover .ac-order-arrow { color: var(--ck-primary); }

/* Status pills */
.ac-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.ac-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.ac-status-delivered { background: rgba(13, 158, 113, 0.12); color: #065f46; }
.ac-status-progress { background: rgba(245, 158, 11, 0.12); color: #92400e; }
.ac-status-pending   { background: rgba(141, 153, 174, 0.15); color: #4b5563; }
.ac-status-cancelled { background: rgba(209, 0, 36, 0.12); color: #b91c1c; }

/* Full order cards (orders page) */
.ac-orders-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ac-orders-list li { margin: 0; }

.ac-order-card {
    background: #ffffff;
    border: 1px solid var(--ck-border);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ac-order-card:hover {
    border-color: var(--ck-primary);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.ac-order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--ck-surface);
    border-bottom: 1px solid var(--ck-border);
}

.ac-order-id-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ac-order-id-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ck-grey);
    font-weight: 700;
}

.ac-order-id-num {
    font-size: 17px;
    font-weight: 700;
    color: var(--ck-dark);
}

.ac-order-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ck-border);
}

@media (max-width: 600px) {
    .ac-order-meta { grid-template-columns: 1fr; gap: 10px; }
}

.ac-order-meta-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ac-order-meta-item > i {
    color: var(--ck-primary);
    font-size: 14px;
    margin-top: 2px;
    width: 18px;
    text-align: center;
}

.ac-order-meta-item > div { display: flex; flex-direction: column; gap: 1px; }

.ac-order-meta-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ck-grey);
    font-weight: 700;
}

.ac-order-meta-item strong {
    font-size: 13px;
    color: var(--ck-dark);
    font-weight: 700;
}

.ac-pay-pending {
    display: inline-block;
    margin-top: 2px;
    padding: 2px 6px;
    background: rgba(245, 158, 11, 0.18);
    color: #92400e;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ac-order-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    gap: 14px;
    background: var(--ck-surface);
    flex-wrap: wrap;
}

.ac-order-total {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ac-order-total span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ck-grey);
    font-weight: 700;
}

.ac-order-total strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--ck-primary);
}

.ck-btn-sm { height: 36px; padding: 0 16px; font-size: 12px; }

/* Empty state */
.ac-empty {
    text-align: center;
    padding: 50px 20px;
}

.ac-empty-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--ck-surface);
    border: 1px solid var(--ck-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: var(--ck-grey);
    margin-bottom: 18px;
}

.ac-empty h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--ck-dark);
}

.ac-empty p {
    color: var(--ck-grey);
    margin: 0 0 24px;
}

/* Mobile */
@media (max-width: 600px) {
    .ac-page-title { font-size: 22px; }
    .ac-profile-head { gap: 12px; }
    .ac-avatar { width: 46px; height: 46px; font-size: 16px; }
    .ac-order {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .ac-order-meta { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ac-order-total { text-align: right; }
    .ac-order-arrow { display: none; }
}

@media (max-width: 480px) {
    .ac-order-meta { grid-template-columns: 1fr; }
    .ac-order-foot { flex-direction: column; align-items: stretch; }
    .ac-order-foot .ck-btn { width: 100%; }
}

/* RTL */
.locale-rtl .ac-nav-item { flex-direction: row-reverse; }
.locale-rtl .ac-nav-count { margin-left: 0; margin-right: auto; }
.locale-rtl .ac-order { direction: rtl; }
.locale-rtl .ac-order-id-block { flex-direction: row-reverse; }
.locale-rtl .ac-order-meta-item { flex-direction: row-reverse; }
.locale-rtl .ac-order-foot { flex-direction: row-reverse; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .ac-action, .ac-order, .ac-order-card, .ac-logout { transition: none !important; transform: none !important; }
}