/* public/css/home/anggaran.css */

/* =============================================
   ANGGARAN SECTION
   ============================================= */
.anggaran-section {
    position: relative;
    padding: 72px 0 80px;
    background: #f0f4f8;
    overflow: hidden;
}

.anggaran-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(26, 90, 110, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(26, 90, 110, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* ---- Header ---- */
.anggaran-header {
    text-align: center;
    margin-bottom: 48px;
}

.anggaran-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(26, 90, 110, 0.08);
    border: 1px solid rgba(26, 90, 110, 0.2);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a5a6e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.25);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.25); }
    50%       { box-shadow: 0 0 0 6px rgba(39, 174, 96, 0.1); }
}

.anggaran-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a2e3a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.anggaran-subtitle {
    font-size: 1rem;
    color: #4a6270;
    margin: 0 0 8px;
}

.anggaran-status {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a5a6e;
    margin: 0;
}

/* ---- Summary Cards ---- */
.anggaran-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

@media (max-width: 992px) {
    .anggaran-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .anggaran-cards { grid-template-columns: 1fr; }
    .anggaran-title  { font-size: 1.5rem; }
}

.anggaran-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px 28px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(26, 90, 110, 0.07);
    border: 1px solid rgba(26, 90, 110, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.anggaran-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a5a6e, #2d8fa8);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.anggaran-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(26, 90, 110, 0.14);
}

.anggaran-card:hover::before {
    opacity: 1;
}

.card-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(26, 90, 110, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #1a5a6e;
}

.card-icon-wrap svg {
    width: 26px;
    height: 26px;
}

.persen-icon {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a5a6e;
    line-height: 1;
}

.card-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b8291;
    margin: 0 0 4px;
}

.card-sublabel {
    font-size: 0.72rem;
    color: #9baeb8;
    margin: 0 0 6px;
}

.card-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #c9933a;
    margin: 0;
    word-break: break-word;
}

.card-value-pct {
    font-size: 1.6rem;
    color: #c9933a;
}

/* Highlighted card */
.card-highlight {
    background: linear-gradient(135deg, #1a5a6e 0%, #2d8fa8 100%);
    border-color: transparent;
}

.card-highlight .card-icon-wrap {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.card-highlight .persen-icon { color: #fff; }
.card-highlight .card-label  { color: rgba(255,255,255,0.75); }
.card-highlight .card-sublabel { color: rgba(255,255,255,0.55); }
.card-highlight .card-value  { color: #fff; }
.card-highlight::before      { display: none; }

/* Skeleton loading */
.skeleton-card .card-value,
.skeleton-card .card-value-pct {
    min-height: 1.4em;
}

/* ---- CTA Button ---- */
.anggaran-cta {
    text-align: center;
    margin-bottom: 0;
}

.btn-lihat-rincian {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1a5a6e;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(26, 90, 110, 0.3);
}

.btn-lihat-rincian svg {
    width: 20px;
    height: 20px;
}

.btn-lihat-rincian:hover {
    background: #16495a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 90, 110, 0.35);
}

/* ---- Detail Table ---- */
.anggaran-table-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(26, 90, 110, 0.1);
    box-shadow: 0 2px 12px rgba(26, 90, 110, 0.07);
    overflow: hidden;
    margin-bottom: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.anggaran-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(26, 90, 110, 0.1);
}

.anggaran-table-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2e3a;
    margin: 0;
}

.btn-collapse {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 90, 110, 0.06);
    border: 1px solid rgba(26, 90, 110, 0.15);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a5a6e;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-collapse:hover { background: rgba(26, 90, 110, 0.12); }

.chevron-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.chevron-icon.rotated { transform: rotate(180deg); }

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.anggaran-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.anggaran-table thead tr {
    background: #1a5a6e;
    color: #fff;
}

.anggaran-table thead th {
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.anggaran-table tbody tr {
    border-bottom: 1px solid rgba(26, 90, 110, 0.07);
    transition: background 0.15s;
}

.anggaran-table tbody tr:hover { background: rgba(26, 90, 110, 0.03); }

.anggaran-table tbody tr:last-child { border-bottom: none; }

.anggaran-table tbody td {
    padding: 14px 18px;
    color: #2c4455;
    vertical-align: middle;
}

.anggaran-table tbody .td-no {
    font-weight: 700;
    color: #1a5a6e;
    white-space: nowrap;
}

.anggaran-table tbody .td-unit {
    font-weight: 600;
    min-width: 280px;
}

.anggaran-table tfoot tr {
    background: #1a2e3a;
    color: #fff;
}

.anggaran-table tfoot td {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #fff;
    white-space: nowrap;
}

.text-right  { text-align: right; }
.text-center { text-align: center; }

.pct-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pct-low    { background: rgba(231, 76, 60, 0.1);   color: #c0392b; }
.pct-medium { background: rgba(243, 156, 18, 0.12);  color: #d68910; }
.pct-high   { background: rgba(39, 174, 96, 0.1);   color: #1e8449; }

/* ---- Error State ---- */
.anggaran-error {
    text-align: center;
    padding: 48px 24px;
    color: #6b8291;
}

.anggaran-error svg {
    width: 48px;
    height: 48px;
    color: #c0392b;
    margin-bottom: 12px;
}

.anggaran-error p {
    margin: 0 0 16px;
    font-size: 0.95rem;
}

.anggaran-error button {
    background: #1a5a6e;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.anggaran-error button:hover { background: #16495a; }