/* ================================================================
   STK DATA MAHASISWA — Frontend Styles
   Sekolah Tinggi Teologi Kalimantan
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── Root variables ── */
.stk-dm-wrap {
    --stk-blue:     #1a4f8a;
    --stk-blue-lt:  #e8f0fb;
    --stk-navy:     #0d2f54;
    --stk-gold:     #c8922a;
    --stk-gold-lt:  #fdf3e0;
    --stk-green:    #2a7a4f;
    --stk-green-lt: #e7f5ed;
    --stk-red:      #9b2929;
    --stk-red-lt:   #fde8e8;
    --stk-gray:     #6b7280;
    --stk-gray-lt:  #f8f9fa;
    --stk-border:   #e5e7eb;
    --stk-radius:   10px;
    --stk-shadow:   0 2px 12px rgba(26,79,138,0.08);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1f2937;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Header ── */
.stk-dm-header {
    background: linear-gradient(135deg, var(--stk-navy) 0%, var(--stk-blue) 100%);
    border-radius: var(--stk-radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 4px 20px rgba(13,47,84,0.25);
}

.stk-dm-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stk-dm-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.stk-dm-title h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    border: none;
    padding: 0;
}

.stk-dm-title p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.75;
    color: white;
}

.stk-dm-stats-bar {
    display: flex;
    gap: 24px;
}

.stk-dm-stat {
    text-align: center;
    background: rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px 20px;
    min-width: 70px;
}

.stk-dm-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: white;
}

.stk-dm-stat-num.stk-male   { color: #93c5fd; }
.stk-dm-stat-num.stk-female { color: #f9a8d4; }

.stk-dm-stat-lbl {
    display: block;
    font-size: 0.72rem;
    opacity: 0.75;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── Section ── */
.stk-dm-section {
    margin-bottom: 28px;
}

.stk-dm-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--stk-navy);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--stk-blue-lt);
}

/* ── Table Wrap ── */
.stk-dm-table-wrap {
    overflow-x: auto;
    border-radius: var(--stk-radius);
    box-shadow: var(--stk-shadow);
    border: 1px solid var(--stk-border);
}

/* ── Tables ── */
.stk-dm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: white;
}

.stk-dm-table thead tr {
    background: var(--stk-blue);
    color: white;
}

.stk-dm-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.stk-dm-table tbody tr {
    border-bottom: 1px solid var(--stk-border);
    transition: background 0.15s;
}

.stk-dm-table tbody tr:hover { background: var(--stk-blue-lt); }
.stk-dm-table tbody tr:last-child { border-bottom: none; }

.stk-dm-table td {
    padding: 11px 14px;
    vertical-align: middle;
}

/* Summary table specifics */
.stk-dm-prodi-row td {
    background: var(--stk-gold-lt) !important;
    color: var(--stk-gold);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-top: 2px solid var(--stk-gold) !important;
}

.stk-dm-prodi-name { padding-left: 14px !important; }

.stk-dm-subtotal td {
    background: var(--stk-blue-lt);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--stk-navy);
}

.stk-dm-grandtotal td {
    background: var(--stk-navy);
    color: white;
    font-size: 0.85rem;
    padding: 14px;
}

.stk-dm-table tfoot tr { border-top: 2px solid var(--stk-border); }

.stk-angkatan-badge {
    display: inline-block;
    background: var(--stk-blue-lt);
    color: var(--stk-blue);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Filters ── */
.stk-dm-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 14px 16px;
    background: var(--stk-gray-lt);
    border-radius: var(--stk-radius);
    border: 1px solid var(--stk-border);
}

.stk-dm-filter-select,
.stk-dm-search {
    padding: 8px 12px;
    border: 1px solid var(--stk-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    background: white;
    color: #1f2937;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stk-dm-filter-select:focus,
.stk-dm-search:focus {
    outline: none;
    border-color: var(--stk-blue);
    box-shadow: 0 0 0 3px rgba(26,79,138,0.1);
}

.stk-dm-search { min-width: 200px; flex: 1; }

.stk-dm-count-label {
    margin-left: auto;
    font-size: 0.82rem;
    color: var(--stk-gray);
}

/* ── Detail table ── */
.stk-nim {
    font-family: 'DM Mono', monospace;
    font-size: 0.78rem;
    background: var(--stk-gray-lt);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--stk-navy);
}

.stk-prodi-pill {
    display: inline-block;
    background: var(--stk-blue-lt);
    color: var(--stk-blue);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Status badges ── */
.stk-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.stk-status-aktif       { background: var(--stk-green-lt); color: var(--stk-green); }
.stk-status-cuti        { background: #fef3c7; color: #92400e; }
.stk-status-tidak-aktif { background: #f3f4f6; color: #6b7280; }
.stk-status-lulus       { background: var(--stk-blue-lt);  color: var(--stk-blue); }
.stk-status-keluar      { background: var(--stk-red-lt);   color: var(--stk-red);  }

/* ── Misc ── */
.stk-num  { text-align: center; }
.stk-bold { font-weight: 700; }
.stk-dash { color: var(--stk-border); }
.stk-nama { font-weight: 500; }

.stk-dm-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--stk-gray);
}
.stk-dm-empty span { font-size: 3rem; display: block; margin-bottom: 12px; }

.stk-dm-footer {
    text-align: right;
    font-size: 0.75rem;
    color: var(--stk-gray);
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--stk-border);
}

/* ── Hidden rows (filter) ── */
#stk-detail-table tbody tr.stk-hidden { display: none; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .stk-dm-header { flex-direction: column; align-items: flex-start; }
    .stk-dm-stats-bar { width: 100%; justify-content: space-around; }
    .stk-dm-filters { flex-direction: column; align-items: stretch; }
    .stk-dm-count-label { margin-left: 0; }
}
