/*
 * My Dashboard CSS — xud-* prefix
 * File: /wp-content/themes/xila/assets/css/my-dashboard.css
 */

/* ═══════════════════════════════════════
   PAGE WRAPPER
═══════════════════════════════════════ */
.xud-page {
    padding-bottom: 60px;
}

/* ═══════════════════════════════════════
   HERO BANNER
═══════════════════════════════════════ */
.xud-hero {
    background: linear-gradient(135deg, #0c1445 0%, #1a2980 45%, #2563eb 80%, #7c3aed 100%);
    border-radius: 18px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(37,99,235,.28);
    position: relative;
}
.xud-hero::before {
    content: '';
    position: absolute;
    top: -60%; right: -10%;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,.06) 0%, transparent 70%);
    pointer-events: none;
}
.xud-hero-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    flex-wrap: wrap;
}
.xud-avatar {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    border: 2.5px solid rgba(255,255,255,.35);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -1px;
}
.xud-hero-info { flex: 1; min-width: 0; }
.xud-greeting {
    font-size: 11px;
    color: rgba(255,255,255,.6);
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 3px;
}
.xud-hero-name {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.xud-hero-email {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xud-hero-desc {
    font-size: 12px;
    color: #f5f5f5;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xud-hero-date {
    text-align: right;
    font-size: 12px;
    color: rgba(255,255,255,.6);
    line-height: 1.5;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════
   STATS ROW
═══════════════════════════════════════ */
.xud-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}
.xud-stat-card {
    background: #fff;
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .18s, transform .18s;
}
.xud-stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.09);
    transform: translateY(-2px);
}
.xud-stat-card--warn   { border-color: #fde68a; background: #fffbeb; }
.xud-stat-card--green  { border-color: #bbf7d0; background: #f0fdf4; }
.xud-stat-card--gold   { border-color: #fde68a; background: linear-gradient(135deg,#fffbeb,#fef9c3); }
.xud-stat-num {
    font-size: 28px;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 4px;
}
.xud-stat-card--warn  .xud-stat-num  { color: #d97706; }
.xud-stat-card--green .xud-stat-num  { color: #16a34a; }
.xud-stat-card--gold  .xud-stat-num  { color: #b45309; }
.xud-stat-lbl {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ═══════════════════════════════════════
   SECTION TITLE
═══════════════════════════════════════ */
.xud-section-title {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-top: 4px;
    padding-left: 2px;
}

/* ═══════════════════════════════════════
   QUICK ACCESS TILES
═══════════════════════════════════════ */
.xud-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 22px;
}
.xud-action-tile {
    background: #fff;
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    padding: 16px 8px 12px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    transition: all .18s;
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    cursor: pointer;
}
.xud-action-tile:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
    box-shadow: 0 6px 20px rgba(37,99,235,.12);
    transform: translateY(-2px);
}
.xud-tile-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.xud-tile-icon--pink   { background: #fff0f6; }
.xud-tile-icon--orange { background: #fff7ed; }
.xud-tile-icon--purple { background: #faf5ff; }
.xud-tile-icon--blue   { background: #eff6ff; }
.xud-tile-icon--yellow { background: #fefce8; }
.xud-tile-icon--cyan   { background: #ecfeff; }
.xud-tile-icon--red    { background: #fff5f5; }
.xud-tile-icon--green  { background: #f0fdf4; }
.xud-tile-lbl {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
}

/* ═══════════════════════════════════════
   EXAM TRACKER SECTION
═══════════════════════════════════════ */
.xud-tracker-section {
    background: #fff;
    border: 1.5px solid #e8edf2;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.xud-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8faff 0%, #eff6ff 100%);
    border-bottom: 1.5px solid #e2e8f0;
}
.xud-section-head-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.xud-section-icon { font-size: 18px; }
.xud-section-name {
    font-size: 14px;
    font-weight: 800;
    color: #1e293b;
}
.xud-section-link {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    transition: all .12s;
}
.xud-section-link:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Tracker content padding */
#xud-tracker-content { padding: 14px 16px 16px; }

/* ── Skeleton ── */
.xud-skeleton { display: flex; flex-direction: column; gap: 10px; }
.xud-skel-card {
    height: 100px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: xudShimmer 1.4s infinite;
    border-radius: 10px;
}
.xud-skel-card--sm   { height: 60px; }
.xud-skel-card--wide { height: 140px; }
@keyframes xudShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Exam Cards ── */
.xud-exam-list { display: flex; flex-direction: column; gap: 12px; }
.xud-exam-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    border-left: 4px solid #94a3b8;
    transition: box-shadow .15s, border-color .15s;
}
.xud-exam-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    border-color: #93c5fd;
}
.xud-exam-card--active   { border-left-color: #22c55e; background: #f0fdf4; }
.xud-exam-card--upcoming { border-left-color: #f59e0b; background: #fffbeb; }
.xud-exam-card--closed   { border-left-color: #94a3b8; opacity: .82; }
.xud-exam-card--archived { border-left-color: #cbd5e1; opacity: .75; }

.xud-exam-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.xud-exam-org {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 3px;
}
.xud-exam-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    cursor: pointer;
    transition: color .12s;
}
.xud-exam-title:hover { color: #2563eb; }

.xud-exam-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}
.xud-exam-cd {}
.xud-cd {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
    background: #dcfce7;
    padding: 2px 9px;
    border-radius: 20px;
    display: inline-block;
    white-space: nowrap;
}
.xud-cd--warn     { color: #d97706; background: #fef3c7; }
.xud-cd--urgent   { color: #ea580c; background: #ffedd5; }
.xud-cd--critical { color: #dc2626; background: #fee2e2; animation: xudPulse 1s infinite; }
.xud-cd--done     { color: #94a3b8; background: #f1f5f9; }
@keyframes xudPulse { 0%,100%{opacity:1} 50%{opacity:.55} }

.xud-status-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.xud-status--active   { background: #dcfce7; color: #16a34a; }
.xud-status--upcoming { background: #fef3c7; color: #d97706; }
.xud-status--closed   { background: #f1f5f9; color: #94a3b8; }
.xud-status--archived { background: #f1f5f9; color: #64748b; }

/* Dates chips */
.xud-exam-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.06);
}
.xud-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
}
.xud-date-type-icon { font-size: 12px; }
.xud-date-label { color: #64748b; font-weight: 600; }
.xud-date-val   { color: #1e293b; font-weight: 700; margin-left: 3px; }

/* ── Follow Button (inside exam card) ── */
.xud-follow-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ── Signals ── */
.xud-signals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.xud-signal {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: box-shadow .12s;
}
.xud-signal:hover { box-shadow: 0 3px 10px rgba(0,0,0,.07); }
.xud-signal--critical { background: #fff5f5; border-color: #fecaca; }
.xud-signal--high     { background: #fff7ed; border-color: #fed7aa; }
.xud-signal--medium   { background: #fffbeb; border-color: #fde68a; }
.xud-signal--info     { background: #f0fdf4; border-color: #bbf7d0; }

.xud-signal-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    margin-bottom: 5px;
    background: #eff6ff; color: #2563eb;
}
.xud-signal--critical .xud-signal-badge { background: #fee2e2; color: #dc2626; }
.xud-signal--high     .xud-signal-badge { background: #ffedd5; color: #ea580c; }
.xud-signal--medium   .xud-signal-badge { background: #fef3c7; color: #d97706; }
.xud-signal--info     .xud-signal-badge { background: #dcfce7; color: #16a34a; }

.xud-signal-content {}
.xud-signal-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    cursor: pointer;
}
.xud-signal-title:hover { color: #2563eb; }
.xud-signal-cd { margin-top: 5px; }

/* ── Empty state ── */
.xud-empty {
    text-align: center;
    padding: 40px 20px;
}
.xud-empty-icon  { font-size: 42px; opacity: .35; margin-bottom: 12px; }
.xud-empty h3    { font-size: 17px; font-weight: 800; color: #1e293b; margin: 0 0 7px; }
.xud-empty p     { font-size: 13px; color: #64748b; margin: 0 0 18px; line-height: 1.6; }
.xud-goto-feed {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37,99,235,.28);
    transition: all .15s;
}
.xud-goto-feed:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(37,99,235,.36); }

/* ═══════════════════════════════════════
   ACCOUNT SETTINGS CARDS
═══════════════════════════════════════ */
.xud-profile-card {
    background: #fff;
    border: 1.5px solid #e8edf2;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: box-shadow .18s;
}
.xud-profile-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

.xud-profile-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    user-select: none;
    transition: background .12s;
}
.xud-profile-card-head:hover { background: #f1f5f9; }

.xud-card-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.xud-card-head-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.xud-card-toggle {
    font-size: 14px;
    color: #94a3b8;
    transition: transform .25s;
}
.xud-card-toggle.is-open { transform: rotate(180deg); }

/* Accordion body */
.xud-profile-card-body {
    display: none;
    padding: 18px;
    border-top: 1px solid #f1f5f9;
    animation: xudSlideDown .2s ease;
}
.xud-profile-card-body.is-open { display: block; }
@keyframes xudSlideDown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

/* ── Form ── */
.xud-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.xud-form-group { display: flex; flex-direction: column; gap: 5px; }
.xud-form-group--full { grid-column: 1 / -1; }
.xud-form-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.xud-form-input {
    padding: 9px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 13.5px;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color .15s, background .15s;
    font-family: inherit;
}
.xud-form-input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.xud-form-input[readonly] {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}
.xud-form-hint { font-size: 11px; color: #94a3b8; }

.xud-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.xud-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    box-shadow: 0 3px 12px rgba(37,99,235,.25);
}
.xud-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(37,99,235,.35);
}
.xud-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.xud-btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #fff;
    color: #dc2626;
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    text-decoration: none;
}
.xud-btn-danger:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

/* Form feedback message */
.xud-form-msg {
    display: none;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}
.xud-form-msg--success { background: #dcfce7; color: #16a34a; }
.xud-form-msg--error   { background: #fee2e2; color: #dc2626; }

/* ── Password Strength Bar ── */
.xud-pwd-strength {
    margin-top: 5px;
    height: 4px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}
.xud-pwd-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width .3s, background .3s;
}

/* ── Notification Prefs ── */
.xud-pref-list { display: flex; flex-direction: column; gap: 0; }
.xud-pref-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #f1f5f9;
}
.xud-pref-item:last-child { border-bottom: none; }
.xud-pref-info { flex: 1; min-width: 0; }
.xud-pref-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}
.xud-pref-desc {
    font-size: 11.5px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Toggle switch */
.xud-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.xud-toggle input { opacity: 0; width: 0; height: 0; }
.xud-toggle-slider {
    position: absolute;
    inset: 0;
    background: #e2e8f0;
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.xud-toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.xud-toggle input:checked + .xud-toggle-slider { background: #2563eb; }
.xud-toggle input:checked + .xud-toggle-slider::before { transform: translateX(20px); }

/* ── Danger zone ── */
.xud-danger-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff5f5;
    border: 1.5px solid #fecaca;
    border-radius: 10px;
    padding: 14px 16px;
    flex-wrap: wrap;
}
.xud-danger-info h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #dc2626;
    margin: 0 0 4px;
}
.xud-danger-info p {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* ── Locked (not logged in) ── */
.xud-locked {
    text-align: center;
    padding: 50px 24px;
    background: linear-gradient(135deg, #f8fafc, #eff6ff);
    border: 1.5px solid #dbeafe;
    border-radius: 18px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 860px) {
    .xud-stats   { grid-template-columns: repeat(2, 1fr); }
    .xud-actions { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
    .xud-hero-inner { padding: 16px; }
    .xud-hero-date  { display: none; }
    .xud-stats      { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .xud-actions    { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .xud-tile-icon  { width: 34px; height: 34px; font-size: 16px; }
    .xud-tile-lbl   { font-size: 9.5px; }
    .xud-form-grid  { grid-template-columns: 1fr; }
    .xud-form-group--full { grid-column: 1; }
}

/* ── Exam Card Footer (Action Buttons + Follow) ── */
.xud-exam-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-wrap: wrap;
}
.xud-exam-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all .15s;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.3;
}
.xud-exam-btn:active { transform: scale(.96); }

.xud-exam-btn--article {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.xud-exam-btn--article:hover {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 3px 10px rgba(29,78,216,.2);
}

.xud-exam-btn--updates {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.xud-exam-btn--updates:hover {
    background: #15803d;
    color: #fff;
    border-color: #15803d;
    box-shadow: 0 3px 10px rgba(21,128,61,.2);
}

/* Follow button — plugin की existing styles को override न करे,
   सिर्फ size/shape match करे */
.xud-exam-btn--follow {
    margin-left: auto;  /* right side पर push करो */
}