/* ============================================================
   iStrology — Dashboard Page Styles (dashboard.css)
   Personalized astrological dashboard, RTL-first
   ============================================================ */

/* ── Dashboard Body ──────────────────────────────────────── */
body.page-template-page-dashboard {
    background: #08060f;
}

body.page-template-page-dashboard::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 10%, rgba(124,58,237,0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 90%, rgba(79,70,229,0.1) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

/* ── Dashboard Wrap ──────────────────────────────────────── */
.dashboard-wrap {
    position: relative;
    z-index: 1;
    max-width: 1140px;
    margin: 0 auto;
    padding: 36px 24px 60px;
    direction: rtl;
}

/* ── Welcome Header ──────────────────────────────────────── */
.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 36px;
    padding: 28px 32px;
    background: linear-gradient(135deg, rgba(20,16,42,0.9) 0%, rgba(26,22,56,0.9) 100%);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.dashboard-welcome__text h1 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: #f0e6ff;
    letter-spacing: -0.3px;
}

.dashboard-welcome__text h1 .user-name-span {
    background: linear-gradient(135deg, #c4b5fd, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-welcome__text p {
    margin: 0;
    font-size: 14px;
    color: #7c6fa0;
}

.dashboard-welcome__tier {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: end;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tier-badge--free    { background: rgba(100,116,139,0.2); color: #94a3b8; border: 1px solid rgba(100,116,139,0.3); }
.tier-badge--premium { background: rgba(234,179,8,0.15);  color: #fde047; border: 1px solid rgba(234,179,8,0.3); }
.tier-badge--pro     { background: rgba(124,58,237,0.2);  color: #c4b5fd; border: 1px solid rgba(124,58,237,0.35); }

/* ── Layout Grid ─────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.dashboard-sidebar {}

/* ── Section Card ────────────────────────────────────────── */
.dash-card {
    background: rgba(16,12,34,0.85);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.dash-card__title {
    font-size: 13px;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(139,92,246,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Profile Cards ───────────────────────────────────────── */
.profile-card {
    padding: 14px;
    border-radius: 10px;
    border: 1px solid rgba(139,92,246,0.15);
    background: rgba(124,58,237,0.07);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    position: relative;
}

.profile-card:last-child { margin-bottom: 0; }

.profile-card:hover,
.profile-card.active {
    border-color: rgba(139,92,246,0.45);
    background: rgba(124,58,237,0.14);
}

.profile-card__name {
    font-size: 15px;
    font-weight: 700;
    color: #e9d5ff;
    margin: 0 0 4px;
}

.profile-card__meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-card__primary {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    background: rgba(124,58,237,0.25);
    color: #c4b5fd;
    border: 1px solid rgba(124,58,237,0.4);
    border-radius: 10px;
    padding: 2px 7px;
    font-weight: 600;
}

/* ── Onboarding CTA ──────────────────────────────────────── */
.onboarding-cta {
    text-align: center;
    padding: 24px 16px;
}

.onboarding-cta__icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.onboarding-cta p {
    font-size: 13px;
    color: #7c6fa0;
    margin: 0 0 14px;
    line-height: 1.5;
}

.btn-cta {
    display: inline-block;
    padding: 10px 22px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(124,58,237,0.35);
}

.btn-cta:hover {
    background: linear-gradient(135deg, #6d28d9, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(124,58,237,0.45);
    color: #fff;
}

/* ── Main Content ────────────────────────────────────────── */
.dashboard-main {}

/* ── Forecast Type Tabs ──────────────────────────────────── */
.forecast-type-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.forecast-type-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid rgba(139,92,246,0.2);
    background: rgba(10,8,21,0.5);
    color: #7c6fa0;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.forecast-type-tab:hover {
    border-color: rgba(139,92,246,0.45);
    color: #c4b5fd;
    background: rgba(124,58,237,0.1);
}

.forecast-type-tab.active {
    background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(79,70,229,0.25));
    border-color: rgba(139,92,246,0.55);
    color: #e9d5ff;
    box-shadow: 0 2px 10px rgba(124,58,237,0.2);
}

/* ── Forecast Content ────────────────────────────────────── */
.forecast-period-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(124,58,237,0.12);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 20px;
    font-size: 12px;
    color: #a78bfa;
    margin-bottom: 16px;
}

.forecast-direction {
    font-size: 15px;
    line-height: 1.75;
    color: #cbd5e1;
    padding: 18px 20px;
    background: rgba(10,8,21,0.5);
    border-inline-start: 3px solid #7c3aed;
    border-radius: 0 10px 10px 0;
    margin-bottom: 20px;
    direction: rtl;
    text-align: start;
}

.forecast-focus {
    background: rgba(79,70,229,0.1);
    border: 1px solid rgba(79,70,229,0.25);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #c7d2fe;
    direction: rtl;
}

.forecast-focus strong {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    margin-bottom: 5px;
}

/* ── Transit Cards Grid ──────────────────────────────────── */
.transit-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.transit-card {
    background: rgba(18,14,38,0.8);
    border: 1px solid rgba(139,92,246,0.18);
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s, transform 0.2s;
    direction: rtl;
}

.transit-card:hover {
    border-color: rgba(139,92,246,0.4);
    transform: translateY(-2px);
}

.transit-card__headline {
    font-size: 14px;
    font-weight: 700;
    color: #f0e6ff;
    line-height: 1.4;
    margin-bottom: 8px;
}

.transit-card__insight {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 10px;
}

.transit-card__footer {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(139,92,246,0.1);
}

.tone-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.tone-badge--expansive   { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.tone-badge--challenging { background: rgba(239,68,68,0.15);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.tone-badge--reflective  { background: rgba(59,130,246,0.15); color: #93c5fd; border: 1px solid rgba(59,130,246,0.3); }
.tone-badge--neutral     { background: rgba(100,116,139,0.15);color: #cbd5e1; border: 1px solid rgba(100,116,139,0.3); }

.domain-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    color: #7c6fa0;
    border: 1px solid rgba(139,92,246,0.15);
}

/* ── Skeleton Loader ─────────────────────────────────────── */
.skeleton {
    border-radius: 8px;
    background: linear-gradient(90deg,
        rgba(124,58,237,0.06) 25%,
        rgba(124,58,237,0.12) 50%,
        rgba(124,58,237,0.06) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-line {
    height: 14px;
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-line--lg { height: 22px; }
.skeleton-line--sm { height: 10px; width: 60%; }

.skeleton-card {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 12px;
}

/* ── Empty / Error States ────────────────────────────────── */
.dash-empty {
    text-align: center;
    padding: 40px 20px;
    color: #4a4270;
}

.dash-empty__icon { font-size: 36px; margin-bottom: 10px; }
.dash-empty p { font-size: 14px; margin: 0; }

.dash-error {
    padding: 14px 16px;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 10px;
    color: #fca5a5;
    font-size: 13px;
    direction: rtl;
}

/* ── Regen button ────────────────────────────────────────── */
.btn-regen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 7px;
    background: rgba(239,68,68,0.08);
    color: #fca5a5;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    margin-inline-start: auto;
}

.btn-regen:hover {
    background: rgba(239,68,68,0.16);
    border-color: rgba(239,68,68,0.5);
}

/* ── Modal Overlay ───────────────────────────────────────── */
.dash-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.dash-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 15, 0.85);
    backdrop-filter: blur(8px);
}

.dash-modal__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 580px;
    background: linear-gradient(135deg, rgba(20, 16, 42, 0.95) 0%, rgba(26, 22, 56, 0.95) 100%);
    border: 1px solid rgba(139, 92, 246, 0.35);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    direction: rtl;
    text-align: start;
    box-sizing: border-box;
}

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

.dash-modal__close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.dash-modal__close:hover {
    color: #f0e6ff;
}

.dash-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #f0e6ff;
    margin: 0 0 6px;
    letter-spacing: -0.2px;
}

.dash-modal__subtitle {
    font-size: 13px;
    color: #7c6fa0;
    margin: 0 0 28px;
}

/* ── Modal Form ─────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

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

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 12px;
    font-weight: 600;
    color: #a78bfa;
}

.form-field input,
.form-field select {
    background: rgba(10, 8, 21, 0.6);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #f0e6ff;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.form-field input:focus,
.form-field select:focus {
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.25);
}

.form-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fca5a5;
    font-size: 13px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
    padding-top: 20px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid rgba(100, 116, 139, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}

.btn-cancel:hover {
    background: rgba(100, 116, 139, 0.15);
    color: #f0e6ff;
}

.btn-submit {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
    transition: all 0.2s;
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #6d28d9, #4338ca);
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(124, 58, 237, 0.45);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Sidebar Add Button ──────────────────────────────────── */
.btn-add-profile {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.btn-add-profile:hover {
    background: rgba(124, 58, 237, 0.24);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
}

