/* ═══════════════════════════════════════════════════════════════
   dashboard.css — Dashboard Layouts, Stat Cards,
                   Notice Board, Event Pills
   ═══════════════════════════════════════════════════════════════ */

/* ── Dashboard Layouts ───────────────────────────────────────────── */
.dashboard-layout    { display: flex; gap: 20px; align-items: flex-start; width: 100%; }
.main-dashboard-area { flex: 1; min-width: 0; }
.dashboard-mid       { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }

/* ── Stat Cards ──────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    /*
      auto-fit + minmax: columns grow to fill the row.
      3 cards → each ~1/3 wide. 4 cards → each ~1/4 wide.
      Never squishes below 180px so it wraps to 2 cols on narrow viewports.
    */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);          /* was a manual value — now uses token */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-card-icon.blue  { background: #eff6ff; color: #3b82f6; }
.stat-card-icon.teal  { background: #f0fdf9; color: #0d9488; }
.stat-card-icon.red   { background: #fef2f2; color: #ef4444; }
.stat-card-icon.amber { background: #fffbeb; color: #f59e0b; }

.stat-card-info { flex: 1; min-width: 0; }

.stat-card-num {
    font-size: 20px; font-weight: 700; line-height: 1.15;
    color: var(--text-primary); letter-spacing: -0.3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.stat-card-label {
    font-size: 11.5px; color: var(--text-muted); margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.stat-card-sub {
    font-size: 11px; color: var(--text-faint); margin-top: 3px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.stat-card-sub.positive { color: #10b981; }
.stat-card-sub.negative { color: #ef4444; }

/* ── Notice Board ────────────────────────────────────────────────── */
.notice-item {
    display: flex; gap: 14px; align-items: flex-start;
    margin-bottom: 14px; padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    padding-left: 12px;
    border-left: 3px solid var(--brand);
}

.notice-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

/* ── Event Pills ─────────────────────────────────────────────────── */
.event-item {
    display: flex; gap: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fafbff;
    border-radius: 10px;
    border-left: 3px solid #4fd1c5;
    align-items: center;
}

.event-date {
    background: white; padding: 5px 8px;
    border-radius: var(--radius-md);
    text-align: center; font-weight: 700; font-size: 11px;
    min-width: 38px;
    box-shadow: var(--shadow-xs);
    line-height: 1.3; color: var(--text-secondary);
}

.event-info b { font-size: 12.5px; color: #1f2937; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    /* stats-grid auto-fit already handles this, but clamp to 2 cols if needed */
    .stats-grid    { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
    .dashboard-mid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; gap: 0.85rem; }
    .dashboard-mid    { grid-template-columns: 1fr; gap: 0.85rem; margin: 0 0 0.85rem 0; }

    /* Force exactly 2 columns on mobile */
    .stats-grid       { grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 0.85rem; }

    .stat-card        { padding: 0.8rem; gap: 10px; border-radius: var(--radius-lg); }
    .stat-card-icon   { width: 36px; height: 36px; font-size: 14px; border-radius: 8px; }
    .stat-card-num    { font-size: 16px; }
    .stat-card-label  { font-size: 11px; }
    .stat-card-sub    { font-size: 10px; }

    .notice-item { padding-left: 10px; gap: 10px; }
    .event-item  { padding: 8px 10px; gap: 10px; }
}

@media (max-width: 480px) {
    .dashboard-mid    { gap: 0.65rem; margin-bottom: 0.65rem; }
    .dashboard-layout { gap: 0.65rem; }
    .stats-grid       { gap: 0.5rem; margin-bottom: 0.65rem; }
    .stat-card        { gap: 8px; padding: 0.75rem; }
}