/* ==========================================================================
   SoftSutra dashboard: login, points, exam tiles, calendar, competition
   Split from index.html lines 98-253 + dashboard mobile rules. Keep selectors scoped to this file's domain.
   ========================================================================== */

  /* PORTAL OVERLAY & 1-CLICK EXAM DASHBOARD */
  .portal-overlay { position: fixed; inset: 0; background: #0f172a; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 8px; }
  .portal-card { background: #ffffff; width: 100%; max-width: 1100px; height: 100%; max-height: 98dvh; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
  
  /* TOP BLUE BRAND HEADER (SOFTSUTRA EXAM + APPRECIATION POINTS & TIERS) */
  .portal-header {
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    color: white; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 8px; flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  }
  .portal-header-top { display: flex; justify-content: space-between; align-items: center; }
  .portal-brand-title { font-size: 16px; font-weight: 900; letter-spacing: 0.3px; color: #ffffff; display: flex; align-items: center; gap: 5px; white-space: nowrap; flex-shrink: 0; }
  .portal-brand-title span { color: #38bdf8; }

  /* COMPACT APPRECIATION POINTS CARD (MAX INFORMATION IN MINIMUM SPACE) */
  .appreciation-banner {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
  }
  .tier-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 12px;
    background: #f59e0b; color: #000;
  }
  .tier-pill.silver { background: #cbd5e1; color: #0f172a; }
  .tier-pill.bronze { background: #d97706; color: #ffffff; }
  .tier-pill.gold { background: #facc15; color: #854d0e; }
  .tier-pill.diamond { background: #38bdf8; color: #0c4a6e; }
  
  .pts-stat { font-weight: 800; color: #38bdf8; font-size: 13px; }
  .standing-stat { font-weight: 700; color: #cbd5e1; font-size: 11px; }
  .btn-info-circle { background: rgba(255,255,255,0.2); border: none; color: white; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; font-size: 11px; font-weight: bold; }

  .portal-body { padding: 12px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 12px; }

  /* TOP DYNAMIC RECENT EXAM HERO BOX (PICHLI BAAR CHUNA GAYA EXAM) */
  .top-recent-hero {
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
  }
  .hero-badge-row { display: flex; justify-content: space-between; align-items: center; }
  .hero-tag { background: #dbeafe; color: #1d4ed8; padding: 2px 7px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
  .hero-day-tag { font-size: 12px; font-weight: 800; color: var(--accent); }
  .hero-exam-title { font-size: 15.5px; font-weight: 800; color: var(--primary); }
  .hero-exam-desc { font-size: 11.5px; color: var(--text-muted); }
  .hero-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
  .btn-hero-start { background: var(--secondary); color: white; font-weight: 700; font-size: 12.5px; padding: 9px; border-radius: 7px; border: none; cursor: pointer; text-align: center; }
  .btn-hero-prev { background: #ffffff; color: #047857; border: 1.5px solid #10b981; font-weight: 700; font-size: 12px; padding: 9px; border-radius: 7px; cursor: pointer; text-align: center; }

  /* 1-CLICK EXAM TILES */
  .category-headline { font-size: 12.5px; font-weight: 800; color: var(--primary); margin-bottom: 6px; display: flex; align-items: center; gap: 5px; }
  .exam-quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .exam-tile-btn { background: #ffffff; border: 1.5px solid #cbd5e1; border-radius: 8px; padding: 9px 7px; text-align: center; cursor: pointer; transition: 0.15s; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
  .exam-tile-btn:active { transform: scale(0.97); }
  .exam-tile-btn.active { border-color: var(--secondary); background: #eff6ff; }
  .exam-tile-btn .tile-icon { font-size: 19px; }
  .exam-tile-btn .tile-title { font-size: 11.5px; font-weight: 700; color: #1e293b; line-height: 1.2; }
  .exam-tile-btn .tile-tag { font-size: 9px; color: #64748b; font-weight: 600; }

  /* STATE SELECT TILES & SUB-PAGE */
  .state-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 8px; }
  .state-tile { background: #faf5ff; border: 1.5px solid #d8b4fe; border-radius: 8px; padding: 9px 6px; text-align: center; cursor: pointer; }
  .state-tile:active { background: #f3e8ff; }
  .state-tile h4 { font-size: 12.5px; color: #6b21a8; font-weight: 800; }
  .state-tile p { font-size: 9.5px; color: #9333ea; margin-top: 2px; }

  /* SUB-PAGE (STATE EXAMS LIST) */
  #stateSubPageView { display: none; background: #faf5ff; border: 1.5px solid #c084fc; border-radius: 8px; padding: 12px; }
  .subpage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px dashed #d8b4fe; padding-bottom: 8px; }

  /* DIRECT CALENDAR POPUP MODAL */
  .calendar-modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.85); z-index: 260; display: none; align-items: center; justify-content: center; padding: 12px; backdrop-filter: blur(4px); }
  .calendar-modal-card { background: #ffffff; width: 100%; max-width: 520px; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; max-height: 88dvh; box-shadow: 0 20px 45px rgba(0,0,0,0.4); }
  .calendar-modal-head { background: linear-gradient(135deg, #0f172a, #1e3a8a); color: white; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
  .calendar-modal-body { padding: 12px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
  
  /* SELECTIVE COMPACT CALENDAR DAYS */
  .days-compact-list { display: flex; flex-direction: column; gap: 8px; }
  .day-row-card { border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 9px 12px; background: white; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
  .day-row-card.today { border: 2px solid var(--secondary); background: #eff6ff; }
  .day-row-card.present { border-color: #86efac; background: #f0fdf4; }
  .day-row-card.missed { border-color: #fecaca; background: #fef2f2; }
  .day-row-card.locked-next { border-color: #cbd5e1; background: #f8fafc; opacity: 0.8; }
  
  .day-row-info h4 { font-size: 13px; font-weight: 800; }
  .day-row-info p { font-size: 10.5px; color: #64748b; margin-top: 2px; }

  /* WELCOME STRIP & DYNAMIC MOOD OWL BANNERS */
  .welcome-strip {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #86efac; border-radius: 10px; padding: 8px 11px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.08);
  }
  .welcome-strip h5 { font-size: 12px; font-weight: 800; color: #166534; display: flex; align-items: center; gap: 5px; }
  .welcome-strip p { font-size: 11px; color: #15803d; margin-top: 1px; line-height: 1.35; font-weight: 600; }

  .duo-alert-banner {
    background: #fef2f2; border: 1.5px solid #f87171; border-radius: 10px; padding: 9px 11px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    animation: bounce 0.6s ease; transition: all 0.25s ease;
  }
  .duo-alert-banner.mood-mild { background: #fffbeb; border-color: #fbbf24; }
  .duo-alert-banner.mood-mild .duo-alert-text h5 { color: #92400e; }
  .duo-alert-banner.mood-mild .duo-alert-text p { color: #b45309; }

  .duo-alert-banner.mood-sad { background: #f1f5f9; border-color: #94a3b8; }
  .duo-alert-banner.mood-sad .duo-alert-text h5 { color: #334155; }
  .duo-alert-banner.mood-sad .duo-alert-text p { color: #475569; }

  .duo-alert-banner.mood-crying { background: #eff6ff; border-color: #60a5fa; }
  .duo-alert-banner.mood-crying .duo-alert-text h5 { color: #1e40af; }
  .duo-alert-banner.mood-crying .duo-alert-text p { color: #1d4ed8; }

  .duo-alert-banner.mood-angry { background: #fef2f2; border-color: #ef4444; }
  .duo-alert-banner.mood-angry .duo-alert-text h5 { color: #991b1b; }
  .duo-alert-banner.mood-angry .duo-alert-text p { color: #b91c1c; }

  .duo-alert-banner.mood-celebrate { background: linear-gradient(135deg, #ecfdf5, #fefce8); border-color: #10b981; }
  .duo-alert-banner.mood-celebrate .duo-alert-text h5 { color: #065f46; }
  .duo-alert-banner.mood-celebrate .duo-alert-text p { color: #047857; }

  @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
  .owl-mascot-wrap { width: 46px; height: 46px; flex-shrink: 0; position: relative; display: flex; align-items: center; justify-content: center; }
  .owl-emoji-badge { position: absolute; bottom: -3px; right: -4px; font-size: 16px; background: #fff; border-radius: 50%; padding: 1px; box-shadow: 0 1px 4px rgba(0,0,0,0.25); line-height: 1; }
  .duo-alert-text { flex: 1; }
  .duo-alert-text h5 { font-size: 12px; font-weight: 800; color: #991b1b; display: flex; align-items: center; justify-content: space-between; }
  .duo-alert-text p { font-size: 11.2px; color: #b91c1c; margin-top: 2px; line-height: 1.38; font-weight: 600; }
  .duo-mini-actions { display: flex; gap: 6px; margin-top: 6px; align-items: center; }
  .btn-duo-action { padding: 4px 9px; font-size: 10.5px; font-weight: 800; border-radius: 6px; border: none; cursor: pointer; background: var(--secondary); color: white; }
  .btn-duo-next { padding: 4px 8px; font-size: 10px; font-weight: 700; border-radius: 6px; border: 1px solid #cbd5e1; background: rgba(255,255,255,0.85); color: #334155; cursor: pointer; }

  /* 50X COMPETITION STATS MODAL */
  .comp-modal-card { background: #ffffff; width: 100%; max-width: 540px; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; max-height: 90dvh; }
  .comp-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 11.5px; }
  .comp-table th { background: #0f172a; color: white; padding: 7px 8px; text-align: left; }
  .comp-table td { padding: 6px 8px; border-bottom: 1px solid #e2e8f0; }
  .comp-table tr:nth-child(even) { background: #f8fafc; }
  .bracket-highlight { font-weight: 800; color: #16a34a; }

/* Dashboard mobile overrides */
@media (max-width: 800px) {
    .exam-quick-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .state-tile-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .hero-actions-grid { grid-template-columns: 1fr; gap: 6px; }
}
