/* ============================================================
   Pill Dashboard — shared styles for policy/term/summary UI
   Used by: homepage (index.blade.php), all-actions page

   Scorecard pattern: big centered number, label beneath.
   Glassmorphism: translucent bg, blur, subtle border.
   ============================================================ */

/* ---- Shared glass base ---- */

.policy-pill,
.term-pill,
.summary-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.policy-pill:hover,
.term-pill:hover,
.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(27, 55, 40, 0.10);
    border-color: rgba(34, 83, 50, 0.22);
}

/* ---- Policy Switcher ---- */

.policy-switcher {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.policy-pill {
    color: #183021;
    padding: 34px 20px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
}

.policy-pill .pill-count {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent, #225332);
}

.policy-pill span {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.policy-pill small {
    color: #5d7262;
    font-size: 0.74rem;
    line-height: 1.35;
}

.policy-pill small b {
    font-weight: 700;
    color: #2a4a33;
}

.policy-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    transform: translateY(-3px);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.policy-pill.active .pill-count {
    color: #fff;
}

.policy-pill.active small {
    color: rgba(255,255,255,0.82);
}

.policy-pill.active small b {
    color: #fff;
}

/* ---- Term Switcher ---- */

.term-switcher {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.term-switcher.visible {
    display: grid;
}

.term-pill {
    color: #183021;
    padding: 30px 20px 26px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

.term-pill .pill-count {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent, #225332);
}

.term-pill span {
    font-weight: 700;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
}

.term-pill small {
    color: #5d7262;
    font-size: 0.74rem;
    line-height: 1.35;
}

.term-pill small b {
    font-weight: 700;
    color: #2a4a33;
}

.term-pill.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    transform: translateY(-3px);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.term-pill.active .pill-count {
    color: #fff;
}

.term-pill.active small {
    color: rgba(255,255,255,0.82);
}

.term-pill.active small b {
    color: #fff;
}

/* ---- Summary Stat Cards ---- */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.summary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px 16px 30px;
    text-decoration: none;
}

.summary-card strong {
    display: block;
    font-size: 3rem;
    line-height: 1;
    color: #173221;
    order: 1;
}

.summary-card span {
    display: block;
    color: #4a6450;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 12px;
    order: 2;
}

.summary-card small {
    display: block;
    color: #8a9e8e;
    font-size: 0.72rem;
    margin-top: 6px;
    line-height: 1.3;
    order: 3;
}

/* ---- Summary Card Color Tones (glass-tinted) ---- */

.summary-green {
    background: rgba(80, 187, 126, 0.14);
    border-color: rgba(80, 187, 126, 0.25);
}
.summary-amber {
    background: rgba(243, 179, 93, 0.16);
    border-color: rgba(243, 179, 93, 0.25);
}
.summary-gray {
    background: rgba(207, 214, 209, 0.30);
    border-color: rgba(207, 214, 209, 0.40);
}
.summary-neutral {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(0, 0, 0, 0.08);
}
/* Progress-range tones (department progress page) */
.summary-progress-green {
    background: rgba(80, 187, 126, 0.16);
    border-color: rgba(80, 187, 126, 0.35);
}
.summary-progress-orange {
    background: rgba(234, 201, 61, 0.16);
    border-color: rgba(234, 201, 61, 0.40);
}
.summary-progress-yellow {
    background: rgba(236, 240, 113, 0.18);
    border-color: rgba(236, 240, 113, 0.45);
}
.summary-progress-red {
    background: rgba(224, 95, 107, 0.14);
    border-color: rgba(224, 95, 107, 0.35);
}

.summary-strong {
    background: linear-gradient(135deg, rgba(34, 83, 50, 0.96), rgba(53, 110, 72, 0.9));
    border-color: rgba(34, 83, 50, 0.5);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.summary-strong span,
.summary-strong strong { color: #fff; }
.summary-strong small  { color: rgba(255,255,255,0.72); }

/* ---- Active state for clickable summary cards ---- */

.summary-card[data-lock],
.summary-card[data-progress] { cursor: pointer; }
.summary-card.is-active {
    outline: 2.5px solid rgba(34, 83, 50, 0.6);
    outline-offset: 2px;
    transform: translateY(-4px);
}

/* ---- Responsive breakpoints ---- */

@media (max-width: 1199.98px) {
    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .policy-switcher {
        grid-template-columns: repeat(2, 1fr);
    }
    .term-switcher.visible {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .policy-switcher {
        grid-template-columns: 1fr;
    }
    .policy-pill {
        width: 100%;
    }
    .term-switcher.visible {
        grid-template-columns: repeat(2, 1fr);
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
}
