/* ── Dashboard Layout ───────────────────────────── */
.cad-dashboard {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
    align-items: start;
    direction: rtl;
}
@media (max-width: 768px) {
    .cad-dashboard { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
}

/* ── Sidebar ────────────────────────────────────── */
.cad-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 90px;
}
.cad-user-card {
    padding: 24px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    background: #f9f9f9;
}
.cad-avatar-img {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}
.cad-user-name { font-weight: 700; font-size: 15px; color: #111; margin: 0; }
.cad-user-email { font-size: 12px; color: #6b7280; }

.cad-nav { padding: 10px 8px; }
.cad-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.cad-nav-item:hover { background: #f5f5f5; color: #111; text-decoration: none; }
.cad-nav-item.active { background: #111; color: #fff; }
.cad-nav-item.active svg { stroke: #fff; }
.cad-logout-item { margin-top: 8px; color: #dc2626 !important; }
.cad-logout-item:hover { background: #fef2f2 !important; }
.cad-logout-item svg { stroke: #dc2626; }
.cad-badge {
    margin-right: auto;
    background: #111;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}
.cad-nav-item.active .cad-badge { background: rgba(255,255,255,0.25); }

/* ── Main ───────────────────────────────────────── */
.cad-main { min-width: 0; }
.cad-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 28px; }
.cad-section-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
.cad-section-header h2 { margin: 0; font-size: 20px; font-weight: 700; color: #111; }

/* ── Profile Forms ──────────────────────────────── */
.cad-profile-form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.cad-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cad-form-group { display: flex; flex-direction: column; gap: 5px; }
.cad-form-group label { font-size: 13px; font-weight: 600; color: #111; }
.cad-form-group input {
    padding: 10px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    color: #111;
    background: #fff;
    outline: none;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.cad-form-group input:focus { border-color: #d63384; box-shadow: 0 0 0 3px rgba(214,51,132,0.1); }
@media (max-width: 480px) { .cad-form-row { grid-template-columns: 1fr; } }

/* ── Buttons ────────────────────────────────────── */
.cad-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; background: #f5f5f5; color: #111;
    border: 1px solid #e5e7eb; border-radius: 8px;
    font-size: 14px; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: all 0.2s; font-family: inherit;
}
.cad-btn:hover { background: #e5e7eb; text-decoration: none; color: #111; }
.cad-btn-primary {
    background: #111; color: #fff; border-color: #111;
    padding: 12px 24px; font-size: 14px; font-weight: 600;
    border-radius: 9px; align-self: flex-start; margin-top: 4px;
}
.cad-btn-primary:hover { background: #333; border-color: #333; color: #fff; }
.cad-btn-small {
    display: inline-flex; align-items: center;
    padding: 5px 12px; background: #f5f5f5; color: #111;
    border: 1px solid #e5e7eb; border-radius: 6px;
    font-size: 12px; font-weight: 500; text-decoration: none;
}
.cad-btn-small:hover { background: #e5e7eb; text-decoration: none; color: #111; }

/* ── Orders Table ───────────────────────────────── */
.cad-orders-table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 10px; }
.cad-orders-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.cad-orders-table th, .cad-orders-table td { padding: 12px 16px; text-align: right; border-bottom: 1px solid #e5e7eb; }
.cad-orders-table th { background: #f9f9f9; font-weight: 600; font-size: 12px; color: #6b7280; text-transform: uppercase; }
.cad-orders-table tbody tr:last-child td { border-bottom: none; }
.cad-orders-table tbody tr:hover { background: #fafafa; }

.cad-status { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.cad-status-completed  { background: #d1fae5; color: #065f46; }
.cad-status-processing { background: #dbeafe; color: #1e40af; }
.cad-status-pending    { background: #fef3c7; color: #92400e; }
.cad-status-cancelled  { background: #fee2e2; color: #991b1b; }
.cad-status-on-hold    { background: #f3e8ff; color: #6b21a8; }
.cad-status-refunded   { background: #f1f5f9; color: #475569; }

.cad-empty-state { display: flex; flex-direction: column; align-items: center; padding: 48px 24px; gap: 12px; color: #6b7280; text-align: center; }
.cad-empty-state svg { opacity: 0.3; }
.cad-empty-state p { font-size: 15px; margin: 0; }

/* ── Mobile sidebar ─────────────────────────────── */
@media (max-width: 768px) {
    .cad-sidebar { position: relative; top: 0; }
    .cad-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
    .cad-nav-item { padding: 8px 12px; font-size: 13px; }
    .cad-section { padding: 20px 16px; }
}
