/* ==========================
   VARIABLES & RESET
========================== */

:root {
    --primary-red: #E53935;
    --primary-orange: #FF7043;
    --primary-yellow: #FFB300;
    --bg-main: #FFF9F5;
    --card-bg: #FFFFFF;
    --card-border: #FFE0B2;
    --text-main: #2C3E50;
    --text-muted: #64748B;
    --input-bg: #FFFFFF;
    --input-border: #FFCC80;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    padding: 30px 20px;
    max-width: 1200px; /* Diperluas agar proporsional di PC */
    margin: 0 auto;
    font-size: 15px;
    line-height: 1.5;
}

/* ==========================
   HEADER
========================== */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
    padding: 24px 30px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(229, 57, 53, 0.18);
    flex-wrap: wrap;
    gap: 16px;
}

h1 {
    font-size: 26px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

select.month-select {
    background: #ffffff;
    color: var(--primary-red);
    border: 2px solid var(--primary-yellow);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

select.month-select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ==========================
   CARDS & LAYOUT GRID
========================== */

.card {
    background: var(--card-bg);
    border-radius: 18px;
    padding: 28px;
    margin-bottom: 28px;
    border: 1px solid var(--card-border);
    box-shadow: 0 6px 20px rgba(255, 112, 67, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 112, 67, 0.1);
}

.card-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-red);
    border-bottom: 2px solid #FFE0B2;
    padding-bottom: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

/* ==========================
   INPUTS & LABELS
========================== */

.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.input-group input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    color: var(--text-main);
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 112, 67, 0.2);
}

input[readonly] {
    background-color: #F8FAFC !important;
    cursor: not-allowed;
    font-weight: 800;
    color: #475569;
    border-color: #CBD5E1;
}

/* ==========================
   PROGRESS BAR
========================== */

.progress-container {
    background: #FFE0B2;
    border-radius: 12px;
    height: 18px;
    overflow: hidden;
    margin: 14px 0 18px 0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-orange));
    border-radius: 12px;
    transition: width 0.4s ease;
}

/* ==========================
   HASIL & STATS
========================== */

.hasil-box {
    background: #FFF3E0;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #FFE0B2;
    font-size: 15px;
}

.hasil-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-main);
}

.hasil-row:last-child {
    margin-bottom: 0;
}

.bold {
    font-weight: 700;
}

.status-badge {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.status-ok {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #A5D6A7;
}

.status-warn {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

/* ==========================
   TABEL POS ANGGARAN
========================== */

table.budget-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

table.budget-table th, 
table.budget-table td {
    padding: 12px 14px;
    text-align: left;
}

table.budget-table th {
    color: var(--primary-red);
    font-size: 14px;
    font-weight: 800;
    border-bottom: 2px solid #FFE0B2;
    background: #FFF3E0;
}

table.budget-table td input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid var(--input-border);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

.btn-add {
    background: linear-gradient(135deg, var(--primary-orange), var(--primary-yellow));
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 18px;
    box-shadow: 0 4px 12px rgba(255, 112, 67, 0.25);
    transition: transform 0.1s ease;
}

.btn-add:hover {
    transform: scale(1.02);
}

.btn-del {
    background: #FFEBEE;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

/* ==========================
   RINGKASAN ANGGARAN & SPLIT GAJI
========================== */

.budget-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 28px;
    margin-top: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.split-panel {
    background: #FFF3E0;
    border: 1px solid #FFE0B2;
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.split-header-title {
    color: var(--primary-red);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 14px;
}

.split-inputs-grid {
    display: flex;
    align-items: center;
    gap: 20px;
}

.split-field {
    flex: 1;
}

.split-field label {
    display: block;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.input-group-pct {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    padding: 2px 16px;
}

.input-group-pct input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--primary-red);
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    padding: 8px 0;
}

.input-group-pct .suffix {
    color: var(--primary-orange);
    font-weight: 800;
    font-size: 20px;
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.summary-label {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-value {
    font-size: 19px;
    font-weight: 800;
}

.val-blue { color: #1976D2; }
.val-pink { color: #D32F2F; }
.val-cyan { color: #0288D1; }
.val-green { color: #2E7D32; }

.banner-sisa-kas {
    background: linear-gradient(135deg, var(--primary-yellow), #FFA000);
    color: #ffffff;
    border-radius: 14px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255, 179, 0, 0.25);
}

.banner-sisa-kas .b-label { font-size: 17px; }
.banner-sisa-kas .b-value { font-size: 26px; }

.banner-gaji-talent {
    background: #E8F5E9;
    border: 1.5px solid #A5D6A7;
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
    gap: 16px;
}

.talent-info .t-title {
    color: #2E7D32;
    font-size: 16px;
    font-weight: 800;
}

.talent-info .t-sub {
    color: #388E3C;
    font-size: 13px;
    margin-top: 2px;
}

.talent-val {
    color: #1B5E20;
    font-size: 26px;
    font-weight: 800;
}

.btn-slip {
    background: #2E7D32;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background-color 0.2s ease;
}

.btn-slip:hover {
    background: #1B5E20;
}

/* ==========================
   MODAL SLIP GAJI
========================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 18px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
    border: 2px solid var(--primary-orange);
}

.slip-header {
    text-align: center;
    border-bottom: 2px dashed #CBD5E1;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.slip-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot-cyan { background-color: #0288D1; }
.dot-green { background-color: #2E7D32; }

/* ==========================
   RESPONSIVE / MEDIA QUERIES
========================== */

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    #modalSlip, #modalSlip * {
        visibility: visible;
    }
    #modalSlip {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: white;
    }
    .no-print {
        display: none !important;
    }
}

/* Penyesuaian tampilan untuk layar HP (Mobile) */
@media (max-width: 480px) {
  /* Mengecilkan padding & ukuran teks di dalam input agar angka tidak terpotong */
  input[type="text"],
  input[type="number"] {
    padding: 8px 6px !important;
    font-size: 13px !important;
    text-align: center;
  }

  /* Mengecilkan jarak (gap) antar kolom */
  .row, .pos-row, div[style*="display: flex"] {
    gap: 6px !important;
  }

  /* Menyesuaikan ukuran tombol hapus (x) */
  button {
    padding: 6px 10px !important;
    font-size: 13px !important;
  }
}
