/* =====================================================================
   HDMS — Helpdesk Management System
   Satu berkas gaya untuk portal Employee dan panel Admin, mengikuti
   prototipe D:\Difan-AMS\hdms-ui.

   Dimuat SETELAH Bootstrap 5. Tidak memakai Tailwind: seluruh token
   prototipe diterjemahkan menjadi CSS biasa di atas kelas Bootstrap yang
   sudah dipakai 100+ halaman, sehingga isi halaman tidak perlu ditulis
   ulang satu per satu.

   Kerangka (sidebar/topbar/konten) memakai awalan .hd- sendiri agar tidak
   bertabrakan dengan sisa kelas templat lama.
   ===================================================================== */

:root {
    --hd-ink:        #0f172a;   /* judul, sidebar, tombol utama          */
    --hd-ink-soft:   #334155;   /* teks isi                              */
    --hd-muted:      #64748b;   /* keterangan                            */
    --hd-dim:        #94a3b8;   /* teks pada latar gelap                 */
    --hd-line:       #e2e8f0;   /* garis pemisah                         */
    --hd-line-soft:  #f1f5f9;   /* garis pemisah tipis                   */
    --hd-ground:     #f0f4f8;   /* latar halaman                         */
    --hd-surface:    #f8fafc;   /* latar isian & kepala tabel            */
    --hd-brand:      #fbbf24;   /* aksen kuning                          */
    --hd-brand-dk:   #f59e0b;
    --hd-hero-1:     #0b3a4a;   /* gradien panel sambutan                */
    --hd-hero-2:     #1a5f6e;
    --hd-sky:        #0369a1;   /* tautan & fokus                        */
    --hd-red:        #d92027;   /* merah logo Difan                      */
    --hd-sidebar-w:  16rem;
}

/* ---------------------------------------------------------------------
   1. Dasar
   --------------------------------------------------------------------- */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--hd-ground);
    color: var(--hd-ink-soft);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--hd-ink); font-weight: 700; }

/* Judul di dalam blok berlatar gelap tetap mewarisi warna bloknya — tanpa ini,
   warna tinta di atas ikut menutupi teks putih pada hero dan card-header
   berwarna (mis. .card-header.bg-primary.text-white). */
.text-white h1, .text-white h2, .text-white h3,
.text-white h4, .text-white h5, .text-white h6,
.hd-hero h1, .hd-hero h2, .hd-hero h3, .hd-hero h4, .hd-hero h5,
.hd-login-panel h1, .hd-login-panel h2, .hd-login-panel h3,
.dashboard-hero h1, .dashboard-hero h2, .dashboard-hero h3, .dashboard-hero h4 { color: inherit; }

a { color: var(--hd-sky); text-decoration: none; }
a:hover { color: #075985; }

:focus-visible { outline: 2px solid var(--hd-sky); outline-offset: 2px; border-radius: 4px; }

.text-muted { color: var(--hd-muted) !important; }

/* ---------------------------------------------------------------------
   2. Kerangka halaman
   --------------------------------------------------------------------- */
.hd-shell { display: block; }

.hd-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--hd-sidebar-w);
    background: var(--hd-ink);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform .3s ease;
}

.hd-main {
    margin-left: var(--hd-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin .3s ease;
}

.hd-content { flex: 1; padding: 1rem; }
@media (min-width: 768px) { .hd-content { padding: 1.5rem; } }

.hd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    z-index: 1040;
}

/* ---- Merek ---- */
.hd-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .5rem;
    padding: 1.5rem 1.25rem;
}
.hd-brand-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    text-decoration: none;
}
.hd-brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .75rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
.hd-brand-mark svg { width: 2rem; height: 2rem; }
.hd-brand-name {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hd-brand-sub {
    display: block;
    font-size: .75rem;
    color: var(--hd-dim);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hd-brand-close {
    display: none;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--hd-dim);
}
.hd-brand-close:hover { background: #1e293b; color: #fff; }

/* ---- Navigasi ---- */
.hd-nav {
    flex: 1;
    padding: 0 .75rem 1rem;
    overflow-y: auto;
    scrollbar-width: none;
}
.hd-nav::-webkit-scrollbar { display: none; }

.hd-nav-section {
    padding: 0 1rem;
    margin: 1.5rem 0 .5rem;
    font-size: .6875rem;
    font-weight: 700;
    color: var(--hd-dim);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.hd-nav-section:first-child { margin-top: .25rem; }

.hd-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .75rem 1rem;
    margin-bottom: .125rem;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: .5rem;
    background: transparent;
    color: var(--hd-dim);
    font-size: .875rem;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.hd-nav-link:hover { background: #1e293b; color: #fff; }
.hd-nav-link.active { background: #1e293b; color: #fff; border-left-color: var(--hd-brand); }
.hd-nav-link.active > i:first-child { color: var(--hd-brand); }
.hd-nav-link > i:first-child { width: 1.25rem; text-align: center; flex-shrink: 0; }
.hd-nav-link > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hd-nav-caret { font-size: .625rem; transition: transform .2s ease; }
.hd-nav-link[aria-expanded="true"] .hd-nav-caret { transform: rotate(180deg); }

.hd-nav-badge {
    flex: 0 0 auto;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.4;
}
.hd-nav-badge.amber { background: var(--hd-brand); color: var(--hd-ink); }

.hd-nav-sub {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem 1rem .5rem 2.75rem;
    margin-bottom: .125rem;
    border-radius: .5rem;
    color: var(--hd-dim);
    font-size: .8125rem;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}
.hd-nav-sub:hover { background: #1e293b; color: #fff; }
.hd-nav-sub.active { background: #1e293b; color: #fff; font-weight: 600; }
.hd-nav-sub.active::before { color: var(--hd-brand); }
.hd-nav-sub::before {
    content: '';
    width: .3125rem; height: .3125rem;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    opacity: .6;
}

/* ---- Kaki sidebar (identitas pengguna) ---- */
.hd-sidebar-foot { padding: 1rem; border-top: 1px solid #1e293b; }
.hd-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}
.hd-user-avatar {
    width: 2.5rem; height: 2.5rem;
    border-radius: 50%;
    background: var(--hd-brand);
    color: var(--hd-ink);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8125rem;
    flex-shrink: 0;
    object-fit: cover;
}
.hd-user-name {
    display: block; font-size: .875rem; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-user-role {
    display: block; font-size: .75rem; color: var(--hd-dim);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-user-out { color: var(--hd-dim); background: none; border: 0; padding: 0; }
.hd-user:hover .hd-user-out, .hd-user-out:hover { color: var(--hd-brand); }

/* ---- Topbar ---- */
.hd-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    background: #fff;
    border-bottom: 1px solid var(--hd-line-soft);
}
@media (min-width: 768px) { .hd-topbar { padding: .75rem 1.5rem; } }

.hd-topbar-left { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.hd-topbar h1 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--hd-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 768px) { .hd-topbar h1 { font-size: 1.25rem; } }
.hd-topbar-sub {
    margin: 0;
    font-size: .75rem;
    color: var(--hd-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 575.98px) { .hd-topbar-sub { display: none; } }

.hd-topbar-actions { display: flex; align-items: center; gap: .5rem; }
@media (min-width: 768px) { .hd-topbar-actions { gap: .75rem; } }

.hd-icon-btn {
    position: relative;
    width: 2.25rem; height: 2.25rem;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--hd-ink);
    transition: background-color .2s ease;
}
.hd-icon-btn:hover { background: var(--hd-line-soft); color: var(--hd-ink); }
.hd-icon-btn::after { display: none !important; }

.hd-burger { display: none; }

.hd-dot {
    position: absolute;
    top: .3rem; right: .3rem;
    min-width: 1rem;
    padding: 0 .25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.hd-profile-btn {
    display: flex; align-items: center; gap: .5rem;
    padding: .25rem .5rem .25rem .25rem;
    border: 0; border-radius: .5rem;
    background: transparent;
    color: var(--hd-ink);
    font-size: .875rem; font-weight: 600;
}
.hd-profile-btn:hover { background: var(--hd-line-soft); }
.hd-profile-btn::after { display: none !important; }
.hd-profile-avatar {
    width: 2.25rem; height: 2.25rem;
    border-radius: 50%;
    background: var(--hd-brand);
    color: var(--hd-ink);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8125rem;
    flex-shrink: 0;
    object-fit: cover;
}
@media (max-width: 767.98px) { .hd-profile-btn > span:not(.hd-profile-avatar) { display: none; } }

/* Aksi utama di topbar (mis. "Tiket Baru") */
.hd-topbar-cta {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .625rem 1rem;
    border-radius: .5rem;
    background: var(--hd-ink);
    color: #fff;
    font-size: .875rem; font-weight: 600;
    white-space: nowrap;
}
.hd-topbar-cta:hover { background: #1e293b; color: #fff; }
@media (max-width: 575.98px) { .hd-topbar-cta { display: none; } }

/* ---- Kaki halaman ---- */
.hd-footer {
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid var(--hd-line-soft);
    color: var(--hd-muted);
    font-size: .8125rem;
    text-align: center;
}

/* ---- Panel sambutan (hero) ---- */
.hd-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(to right, var(--hd-hero-1), var(--hd-hero-2));
    color: #fff;
}
@media (min-width: 768px) { .hd-hero { padding: 2rem; } }
.hd-hero::before,
.hd-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    pointer-events: none;
}
.hd-hero::before { width: 16rem; height: 16rem; right: -4rem; top: -4rem; }
.hd-hero::after  { width: 12rem; height: 12rem; right: -1rem; bottom: -4.5rem; }
.hd-hero > * { position: relative; }
.hd-hero h1, .hd-hero h2, .hd-hero h3, .hd-hero h4 { color: #fff; }
.hd-hero-eyebrow {
    color: var(--hd-brand);
    font-size: .8125rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: .5rem;
}
.hd-hero-note { color: #cbd5e1; }
.hd-hero-glass {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(10px);
    border-radius: .75rem;
    padding: 1.25rem;
}

/* ---------------------------------------------------------------------
   3. Kerangka pada tablet & ponsel
       Laci geser di bawah 1024px agar tablet mendapat lebar penuh.
   --------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hd-sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(15, 23, 42, .25); }
    .hd-main { margin-left: 0; }
    .hd-burger { display: inline-flex; }
    .hd-brand-close { display: inline-flex; }

    .hd-shell.hd-open .hd-sidebar { transform: translateX(0); }
    .hd-shell.hd-open .hd-overlay { display: block; }
}
body.hd-locked { overflow: hidden; }

/* ---------------------------------------------------------------------
   4. Komponen Bootstrap disesuaikan
   --------------------------------------------------------------------- */

/* ---- Kartu ---- */
.card {
    border: 1px solid var(--hd-line-soft);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.card-header {
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--hd-line-soft);
    border-radius: 1rem 1rem 0 0 !important;
    font-weight: 600;
    color: var(--hd-ink);
}
.card-body { padding: 1.25rem; }
.card-footer {
    background: var(--hd-surface);
    border-top: 1px solid var(--hd-line-soft);
    border-radius: 0 0 1rem 1rem !important;
}
.card-title { color: var(--hd-ink); font-weight: 700; }

/* ---- Tombol ---- */
.btn {
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 600;
    padding: .5rem 1rem;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn-sm { padding: .35rem .75rem; font-size: .8125rem; border-radius: .5rem; }
.btn-lg { padding: .75rem 1.25rem; font-size: 1rem; border-radius: .625rem; }

.btn-primary {
    background-color: var(--hd-ink);
    border-color: var(--hd-ink);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-primary.active, .show > .btn-primary.dropdown-toggle {
    background-color: #1e293b;
    border-color: #1e293b;
    color: #fff;
}
.btn-check:checked + .btn-primary { background-color: #1e293b; border-color: #1e293b; }
/* Tombol nonaktif: Bootstrap mengembalikannya ke biru bawaan lewat
   --bs-btn-disabled-bg; disamakan lagi supaya tetap satu warna dengan merek. */
.btn-primary.disabled, .btn-primary:disabled,
fieldset:disabled .btn-primary { background-color: var(--hd-ink); border-color: var(--hd-ink); opacity: .5; }

.btn-secondary, .btn-outline-secondary {
    --bs-btn-color: var(--hd-ink-soft);
    --bs-btn-border-color: var(--hd-line);
    --bs-btn-hover-border-color: #cbd5e1;
}
.btn-secondary {
    background-color: #fff;
    border-color: var(--hd-line);
    color: var(--hd-ink-soft);
}
.btn-secondary:hover, .btn-secondary:focus, .btn-secondary:active {
    background-color: var(--hd-surface);
    border-color: #cbd5e1;
    color: var(--hd-ink);
}
.btn-outline-secondary { color: var(--hd-ink-soft); border-color: var(--hd-line); }
.btn-outline-secondary:hover {
    background-color: var(--hd-surface);
    border-color: #cbd5e1;
    color: var(--hd-ink);
}

.btn-warning {
    background-color: var(--hd-brand);
    border-color: var(--hd-brand);
    color: var(--hd-ink);
}
.btn-warning:hover, .btn-warning:focus, .btn-warning:active {
    background-color: var(--hd-brand-dk);
    border-color: var(--hd-brand-dk);
    color: var(--hd-ink);
}
.btn-outline-primary { color: var(--hd-ink); border-color: var(--hd-ink); }
.btn-outline-primary:hover { background-color: var(--hd-ink); border-color: var(--hd-ink); color: #fff; }

.btn-link { color: var(--hd-sky); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: #075985; }

/* ---- Isian formulir ---- */
.form-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--hd-ink-soft);
    margin-bottom: .375rem;
}
.form-control, .form-select {
    background-color: var(--hd-surface);
    border: 1px solid var(--hd-line);
    border-radius: .5rem;
    color: var(--hd-ink-soft);
    font-size: .875rem;
    padding: .5625rem .75rem;
}
.form-control:focus, .form-select:focus {
    background-color: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .18);
    color: var(--hd-ink);
}
.form-control::placeholder { color: var(--hd-muted); }
.form-control-sm, .form-select-sm { font-size: .8125rem; padding: .375rem .625rem; border-radius: .5rem; }
.form-control:disabled, .form-control[readonly], .form-select:disabled {
    background-color: var(--hd-line-soft);
    color: var(--hd-muted);
}
.form-text { color: var(--hd-muted); font-size: .75rem; }
.input-group-text {
    background-color: var(--hd-line-soft);
    border: 1px solid var(--hd-line);
    border-radius: .5rem;
    color: var(--hd-muted);
    font-size: .875rem;
}
.form-check-input:checked { background-color: var(--hd-ink); border-color: var(--hd-ink); }
.form-check-input:focus { border-color: #0ea5e9; box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .18); }
.was-validated .form-control:invalid, .form-control.is-invalid,
.was-validated .form-select:invalid, .form-select.is-invalid { border-color: #ef4444; }
.invalid-feedback { font-size: .75rem; }

/* Select2 mengikuti tinggi & sudut isian Bootstrap */
.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--hd-surface);
    border-color: var(--hd-line);
    border-radius: .5rem;
    font-size: .875rem;
    /* Setinggi .form-control agar sebaris dengan isian di sebelahnya. */
    min-height: calc(1.5em + 1.125rem + 2px);
    align-items: center;
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .18);
}
.select2-container--bootstrap-5 .select2-dropdown {
    border-color: var(--hd-line);
    border-radius: .5rem;
    font-size: .875rem;
}
.select2-container--bootstrap-5 .select2-results__option--highlighted { background: var(--hd-ink); }

/* ---- Tabel ----
   Disamakan dengan prototipe hdms-ui (lihat tickets.html / assets.html):

     <thead class="bg-[#f8fafc] text-xs font-semibold text-[#64748b]
                   uppercase tracking-wide">
       <th class="px-4 py-3 text-left">
     <tbody class="divide-y divide-slate-100">
       <td class="px-4 py-4">

   Artinya: kepala tabel berlatar #f8fafc, huruf 12px tebal 600, tanpa garis
   bawah tersendiri; baris dipisah garis #f1f5f9; tidak ada garis tegak, tidak
   ada belang, dan seluruh baris menyala saat disorot. */
.table {
    --bs-table-bg: transparent;
    color: var(--hd-ink-soft);
    font-size: .875rem;
    margin-bottom: 0;
    vertical-align: middle;
    border-color: var(--hd-line-soft);
}
.table > :not(caption) > * > * { border-bottom-width: 0; box-shadow: none; }

.table > thead > tr > th,
.table > thead > tr > td {
    background: var(--hd-surface);
    border-bottom: 0;
    color: var(--hd-muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: uppercase;
    padding: .75rem 1rem;
    white-space: nowrap;
    vertical-align: middle;
}
/* Tombol pengurut milik DataTables mewarisi huruf kepala tabel. */
.table > thead > tr > th a,
.table > thead > tr > th button { color: inherit; font: inherit; letter-spacing: inherit; }

.table > tbody > tr > td,
.table > tbody > tr > th {
    padding: 1rem;
    border-top: 1px solid var(--hd-line-soft);
    background: transparent;
}
/* divide-y: pemisah hanya DI ANTARA baris — tidak di atas baris pertama. */
.table > tbody > tr:first-child > td,
.table > tbody > tr:first-child > th { border-top: 0; }

/* Seluruh baris menyala saat disorot, seperti .row-hover pada prototipe —
   tidak menunggu kelas .table-hover. */
.table > tbody > tr:hover > * { background-color: var(--hd-surface); }

/* Prototipe tidak memakai belang. Garis tegak sengaja TIDAK dimatikan:
   .table-bordered di aplikasi ini hanya dipakai untuk kisi yang memang butuh
   kotak — kalender ruang & kendaraan, matriks permission, tabel pembanding
   pihak pada laporan insiden. */
.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: transparent; background-color: transparent; color: inherit; }
.table-bordered > :not(caption) > * > * { border-color: var(--hd-line); }
.table-bordered > thead > tr > th { border-bottom-color: var(--hd-line); }
.table-light > :not(caption) > * > * { background: var(--hd-surface); color: var(--hd-muted); }
/* Satu-satunya kepala gelap di aplikasi ini (matriks permission) tetap gelap;
   tanpa aturan ini teks putihnya jatuh di atas latar terang. */
.table > thead.table-dark > tr > th,
.table > thead.table-dark > tr > td { background: var(--hd-ink); color: #fff; }

.table-sm > thead > tr > th { padding: .5rem .75rem; }
.table-sm > tbody > tr > td, .table-sm > tbody > tr > th { padding: .625rem .75rem; }
.table-borderless > tbody > tr > td, .table-borderless > tbody > tr > th { border-top: 0; }
.table-borderless > tbody > tr:hover > * { background-color: transparent; }

/* Sudut kartu tetap membulat walau tabel menempel di tepinya. */
.card > .table-responsive:last-child,
.card > .table:last-child { border-radius: 0 0 1rem 1rem; overflow: hidden; }
.card > .table-responsive:first-child,
.card > .table:first-child { border-radius: 1rem 1rem 0 0; overflow: hidden; }

/* Tabel apa pun boleh menggeser ke samping alih-alih merusak lebar halaman;
   pembungkusnya dipasang otomatis oleh skrip kerangka bila belum ada. */
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ---- Tabel pada ponsel: setiap baris menjadi kartu ----
   Persis perilaku .dios-stack di prototipe. Label kolom disalin dari <thead>
   ke atribut data-label oleh partials/_shell-script; tabel matriks dikecualikan
   lewat atribut data-no-stack. */
@media (max-width: 767px) {
    /* width juga dipaksa: DataTables menuliskan lebar piksel langsung pada
       atribut style tabel, dan tanpa ini kartu-kartunya melebar ke samping
       sehingga nilainya terdorong keluar layar. */
    table.dios-stack { min-width: 0 !important; width: 100% !important; }
    table.dios-stack colgroup { display: none; }
    /* Kepala tabel disembunyikan dari mata tapi tetap terbaca pembaca layar.
       display:block wajib: pada thead ber-display table-header-group, Chrome
       mengabaikan position:absolute, sehingga lebar kolom aslinya — termasuk
       lebar piksel yang ditulis DataTables — tetap melebarkan tabel. */
    table.dios-stack thead {
        display: block;
        position: absolute; width: 1px; height: 1px;
        overflow: hidden; clip: rect(0, 0, 0, 0);
    }
    table.dios-stack thead tr,
    table.dios-stack thead th { display: block; width: auto !important; }
    /* box-sizing ditegaskan: sel tabel tidak selalu ikut aturan border-box
       global, dan dengan content-box lebar 100% + padding meluber ke samping. */
    table.dios-stack tbody,
    table.dios-stack tr,
    table.dios-stack td { display: block; width: 100%; box-sizing: border-box; }
    table.dios-stack tr {
        border: 1px solid var(--hd-line);
        border-radius: 12px;
        background: #fff;
        padding: 6px 4px;
        margin: 0 0 12px;
    }
    table.dios-stack tr:last-child { margin-bottom: 0; }
    table.dios-stack tr:hover > * { background-color: transparent; }
    table.dios-stack td {
        display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
        border: 0 !important;
        padding: 8px 12px !important;
        text-align: left !important;
        /* "anywhere" (bukan break-word) supaya lebar minimum sel ikut mengecil;
           tanpa ini nilai panjang tanpa spasi — email, nomor tiket — mendorong
           kartunya melebihi lebar layar. */
        overflow-wrap: anywhere;
        /* Sel yang isinya lebih dari satu bagian — tanggal + lencana, misalnya —
           turun ke baris berikutnya alih-alih terpotong di tepi kartu. */
        flex-wrap: wrap;
    }
    /* Lencana boleh berganti baris di dalam kartu; di tabel lebar ia tetap
       nowrap supaya kolomnya tidak berkerut. */
    table.dios-stack td .badge,
    table.dios-stack td .badge-status { white-space: normal; }
    table.dios-stack td[data-label]::before {
        content: attr(data-label);
        flex: 0 0 38%;
        font-size: 12px; font-weight: 600; color: var(--hd-muted);
        text-transform: uppercase; letter-spacing: .04em; line-height: 1.5;
    }
    table.dios-stack td > * { min-width: 0; }
}

/* ---- Lencana ---- */
.badge {
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 600;
    padding: .375rem .625rem;
    letter-spacing: .01em;
}
.badge.bg-primary   { background: #e0f2fe !important; color: #075985 !important; }
.badge.bg-secondary { background: var(--hd-line-soft) !important; color: var(--hd-ink-soft) !important; }
.badge.bg-success   { background: #d1fae5 !important; color: #047857 !important; }
.badge.bg-danger    { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.bg-warning   { background: #fef3c7 !important; color: #b45309 !important; }
.badge.bg-info      { background: #ede9fe !important; color: #6d28d9 !important; }
.badge.bg-light     { background: var(--hd-line-soft) !important; color: var(--hd-ink-soft) !important; }
.badge.bg-dark      { background: var(--hd-ink) !important; color: #fff !important; }

/* ---- Pemberitahuan ---- */
.alert {
    border: 1px solid transparent;
    border-radius: .75rem;
    font-size: .875rem;
    padding: .875rem 1rem;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info    { background: #f0f9ff; border-color: #bae6fd; color: #075985; }

/* ---- Tab ---- */
.nav-tabs { border-bottom: 1px solid var(--hd-line); gap: .25rem; }
.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--hd-muted);
    font-size: .875rem;
    font-weight: 600;
    padding: .625rem .875rem;
}
.nav-tabs .nav-link:hover { border-bottom-color: var(--hd-line); color: var(--hd-ink); }
.nav-tabs .nav-link.active {
    background: transparent;
    border-bottom-color: var(--hd-brand);
    color: var(--hd-ink);
}
.nav-pills .nav-link { border-radius: .5rem; font-size: .875rem; font-weight: 600; color: var(--hd-muted); }
.nav-pills .nav-link.active { background: var(--hd-ink); color: #fff; }

/* ---- Menu turun ---- */
.dropdown-menu {
    border: 1px solid var(--hd-line-soft);
    border-radius: .75rem;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .18);
    padding: .25rem;
    font-size: .875rem;
    max-width: calc(100vw - 1.5rem);
}
.dropdown-item { border-radius: .5rem; color: var(--hd-ink-soft); padding: .5rem .75rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--hd-surface); color: var(--hd-ink); }
.dropdown-item.text-danger:hover { background: #fef2f2; }
.dropdown-header { color: var(--hd-muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.dropdown-divider { border-color: var(--hd-line-soft); }

/* ---- Modal ---- */
.modal-content { border: 0; border-radius: 1rem; box-shadow: 0 24px 64px -16px rgba(15, 23, 42, .35); }
.modal-header { border-bottom: 1px solid var(--hd-line-soft); padding: 1rem 1.25rem; }
.modal-title { font-size: 1rem; font-weight: 700; color: var(--hd-ink); }
.modal-body { padding: 1.25rem; }
.modal-footer { border-top: 1px solid var(--hd-line-soft); padding: .875rem 1.25rem; }

/* ---- Halaman & remah roti ---- */
.pagination { --bs-pagination-border-radius: .5rem; font-size: .875rem; gap: .25rem; }
.page-link { border-radius: .5rem; border-color: var(--hd-line); color: var(--hd-ink-soft); }
.page-item.active .page-link { background: var(--hd-ink); border-color: var(--hd-ink); color: #fff; }
.page-link:hover { background: var(--hd-surface); color: var(--hd-ink); }

.breadcrumb { font-size: .8125rem; margin-bottom: 0; }
.breadcrumb-item, .breadcrumb-item.active { color: var(--hd-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--hd-dim); }

.progress { border-radius: 999px; background: var(--hd-line-soft); height: .5rem; }
.progress-bar { background: var(--hd-ink); }

.list-group-item { border-color: var(--hd-line-soft); font-size: .875rem; }

/* ---------------------------------------------------------------------
   5. Kelas milik halaman yang sudah ada
       Dipertahankan namanya agar 100+ view tidak perlu disunting; hanya
       tampilannya yang disamakan dengan prototipe.
   --------------------------------------------------------------------- */

/* ---- Judul halaman (view admin) ---- */
.page-header { margin-bottom: 1.25rem; }
/* .page-title dipakai dua cara di view admin: kadang sebagai judulnya sendiri,
   kadang sebagai pembungkus judul + keterangan. Ukuran dan tebalnya karena itu
   hanya dipasang bila elemennya memang sebuah judul. */
.page-title { color: var(--hd-ink); margin-bottom: .25rem; }
h1.page-title, h2.page-title, h3.page-title,
h4.page-title, h5.page-title { font-size: 1.25rem; font-weight: 700; }

/* ---- Kartu angka (dashboard & index admin) ---- */
.dash-count {
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 1rem;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}
.dash-count:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgba(15, 23, 42, .1); }
.dash-count h4 { font-size: 1.5rem; font-weight: 700; color: var(--hd-ink); margin: 0; }
.dash-count h5 { font-size: .75rem; font-weight: 500; color: var(--hd-muted); margin: .25rem 0 0; }
.dash-count.das1 h4 { color: #047857; }
.dash-count.das2 h4 { color: #6d28d9; }
.dash-count.das3 h4 { color: #b45309; }

/* ---- Kartu isi (view employee) ---- */
.card-dashboard {
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.card-dashboard h6 {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--hd-ink);
    font-weight: 700;
    font-size: .9375rem;
    border-bottom: 1px solid var(--hd-line-soft);
    padding-bottom: .75rem;
    margin-bottom: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 1.25rem;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgba(15, 23, 42, .1); }
.stat-icon {
    width: 3.25rem; height: 3.25rem;
    border-radius: .875rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Deret angka ringkas */
.stat-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-radius: .75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: .25rem .5rem;
    margin-bottom: 1.25rem;
}
.stat-group { display: flex; align-items: center; flex-wrap: wrap; }
.stat-group-label {
    font-size: .6875rem; font-weight: 700; text-transform: uppercase;
    color: var(--hd-dim); letter-spacing: .05em;
    padding: 0 .875rem; white-space: nowrap;
}
.stat-pill { display: flex; align-items: center; gap: .5rem; padding: .625rem .875rem; }
.stat-pill .stat-pill-icon {
    width: 2rem; height: 2rem;
    border-radius: .625rem;
    display: flex; align-items: center; justify-content: center;
    font-size: .875rem; flex-shrink: 0;
}
.stat-pill .stat-pill-label { font-size: .6875rem; color: var(--hd-muted); line-height: 1; margin-bottom: .125rem; }
.stat-pill .stat-pill-value { font-size: 1.0625rem; font-weight: 700; line-height: 1; color: var(--hd-ink); }
.stat-divider { width: 1px; align-self: stretch; background: var(--hd-line-soft); margin: .5rem .25rem; }

@media (max-width: 576px) {
    .stat-strip { flex-direction: column; align-items: stretch; padding: .5rem; gap: .125rem; }
    .stat-group { display: grid; grid-template-columns: 1fr 1fr; width: 100%; column-gap: .25rem; }
    .stat-group-label { grid-column: 1 / -1; padding: .375rem .375rem .125rem; }
    .stat-pill { padding: .5rem .625rem; }
}

/* ---- Lencana status (view employee) ---- */
.badge-status {
    display: inline-block;
    padding: .375rem .625rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-pending, .badge-arsip, .badge-ditolak { background: #fee2e2; color: #b91c1c; }
.badge-proses, .badge-diajukan, .badge-diproses { background: #fef3c7; color: #b45309; }
.badge-aktif, .badge-disetujui, .badge-selesai { background: #d1fae5; color: #047857; }
.badge-draft, .badge-dikembalikan { background: var(--hd-line-soft); color: var(--hd-ink-soft); }
.badge-dipinjam { background: #e0f2fe; color: #075985; }

/* ---- Aksi & saringan ---- */
.btn-action { padding: .35rem .75rem; border-radius: .5rem; font-size: .8125rem; margin: .125rem; }
.search-box {
    width: 100%;
    max-width: 20rem;
    padding: .5625rem .875rem;
    background: var(--hd-surface);
    border: 1px solid var(--hd-line);
    border-radius: .5rem;
    font-size: .875rem;
}
.search-box:focus { background: #fff; border-color: #0ea5e9; outline: none; box-shadow: 0 0 0 .2rem rgba(14, 165, 233, .18); }
.filter-select {
    padding: .5rem .875rem;
    background: var(--hd-surface);
    border: 1px solid var(--hd-line);
    border-radius: .5rem;
    font-size: .875rem;
}
.filter-select:focus { background: #fff; border-color: #0ea5e9; outline: none; }

/* ---- Judul bagian di dalam konten ---- */
.dashboard-section-title, .content .section-title {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--hd-muted);
}

/* ---- Kartu "menunggu tindakan" & KPI (dashboard admin) ----
       Dipindahkan dari admin-theme.css yang sudah tidak dimuat lagi; hanya
       warnanya yang mengikuti palet baru. --tile-c / --kc diberikan oleh
       masing-masing kartu lewat atribut style. */
.action-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .625rem;
    font-size: .8125rem;
    font-weight: 700;
    color: var(--hd-ink);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.action-head .ah-badge {
    padding: .0625rem .5625rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: .6875rem;
    font-weight: 700;
}
.action-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.action-tile {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem .875rem;
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-left: 3px solid var(--tile-c, var(--hd-brand));
    border-radius: .75rem;
    color: var(--hd-ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}
.action-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgba(15, 23, 42, .1); color: var(--hd-ink); }
.action-tile .at-ic {
    width: 2.5rem; height: 2.5rem;
    border-radius: .625rem;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.0625rem;
    background: color-mix(in srgb, var(--tile-c, #64748b) 14%, #fff);
    color: var(--tile-c, var(--hd-ink));
}
.action-tile .at-body { min-width: 0; line-height: 1.25; }
.action-tile .at-count { font-size: 1.25rem; font-weight: 700; }
.action-tile .at-label { font-size: .78125rem; color: var(--hd-muted); }
.action-tile .at-go { margin-left: auto; flex-shrink: 0; font-size: .8125rem; color: var(--tile-c, var(--hd-muted)); }

.tkt-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.625rem, 1fr)); gap: .75rem; }
.tkt-card {
    display: flex;
    align-items: center;
    gap: .8125rem;
    padding: .9375rem 1rem;
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-radius: .875rem;
    color: var(--hd-ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}
.tkt-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px -5px rgba(15, 23, 42, .1); color: var(--hd-ink); }
.tkt-card .kc-ic {
    width: 2.875rem; height: 2.875rem;
    border-radius: .75rem;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1875rem;
    background: color-mix(in srgb, var(--kc, #64748b) 14%, #fff);
    color: var(--kc, var(--hd-ink));
}
.tkt-card .kc-n { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.tkt-card .kc-n.sm { font-size: 1.0625rem; }
.tkt-card .kc-l { display: block; font-size: .78125rem; color: var(--hd-muted); }
.tkt-card.is-alert { border-color: #fde68a; background: #fffbeb; }

/* Rincian tiket per jenis (GA Dashboard) */
.ga-type-list { display: flex; flex-direction: column; gap: .5rem; }
.ga-type-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem .75rem;
    border: 1px solid var(--hd-line-soft);
    border-radius: .625rem;
    color: var(--hd-ink);
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease;
}
.ga-type-row:hover { background: var(--hd-surface); border-color: var(--hd-line); color: var(--hd-ink); }
.ga-type-row .gt-ic {
    width: 2.125rem; height: 2.125rem;
    border-radius: .5625rem;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .9375rem;
    background: color-mix(in srgb, var(--kc, #64748b) 14%, #fff);
    color: var(--kc, var(--hd-ink));
}
.ga-type-row .gt-label { font-size: .84375rem; font-weight: 500; }
.ga-type-row .gt-total { margin-left: auto; font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ga-type-row .gt-open {
    flex-shrink: 0; min-width: 5.75rem; text-align: right;
    font-size: .71875rem; font-weight: 700; color: #b91c1c;
}
.ga-type-row .gt-open.gt-clear { color: var(--hd-dim); font-weight: 500; font-style: italic; }

/* Wadah grafik pada halaman rekap.

   Sebelumnya tinggi grafik ditentukan atribut `height` pada <canvas>, yang oleh
   Chart.js hanya dibaca sebagai rasio — bukan tinggi. Lebar layar yang menyempit
   karena itu ikut memendekkan grafiknya. Wadah bertinggi tetap plus
   maintainAspectRatio:false membuat tingginya berdiri sendiri dari lebarnya. */
.chart-box { position: relative; height: 17.5rem; }
@media (max-width: 575px) { .chart-box { height: 15rem; } }

/* ---- Sisa kelas templat lama yang masih terpakai di isi halaman ---- */
.table-top { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.wordset { display: flex; align-items: center; gap: .5rem; }
/* Deret tombol Tambah/Export/Refresh ditulis sebagai <ul><li> di view lama. */
.wordset ul {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
    list-style: none; padding-left: 0; margin: 0;
}
.wordset ul li { margin: 0; }
.wordset ul li .btn { white-space: nowrap; }
.avatar { width: 2.5rem; height: 2.5rem; font-weight: 700; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.25rem; }

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: .3125rem; top: .25rem; bottom: .25rem;
    width: 2px;
    background: var(--hd-line);
}
.timeline > li, .timeline > div { position: relative; margin-bottom: 1rem; }
.timeline > li::before, .timeline > div::before {
    content: '';
    position: absolute;
    left: -1.5rem; top: .4rem;
    width: .75rem; height: .75rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--hd-brand);
    box-shadow: 0 0 0 1px var(--hd-line);
}

/* ---------------------------------------------------------------------
   6. Halaman masuk
   --------------------------------------------------------------------- */
.hd-login { min-height: 100vh; display: grid; }
@media (min-width: 992px) { .hd-login { grid-template-columns: 1fr 1fr; } }

.hd-login-panel {
    display: none;
    position: relative;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem;
    color: #fff;
    background: linear-gradient(to bottom right, var(--hd-hero-1), var(--hd-ink) 55%, var(--hd-hero-2));
}
@media (min-width: 992px) { .hd-login-panel { display: flex; } }
.hd-login-panel::before,
.hd-login-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}
.hd-login-panel::before { width: 24rem; height: 24rem; left: -6rem; top: -6rem; }
.hd-login-panel::after  { width: 26rem; height: 26rem; right: -5rem; bottom: -7.5rem; }
.hd-login-panel > * { position: relative; }
.hd-login-panel h2 { color: #fff; font-size: 1.875rem; line-height: 1.25; }
.hd-login-panel p { color: #cbd5e1; }

.hd-login-features { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hd-login-feature {
    border-radius: .75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
}
.hd-login-feature i { color: var(--hd-brand); margin-bottom: .5rem; display: block; }
.hd-login-feature strong { display: block; font-size: .875rem; font-weight: 600; color: #fff; }
.hd-login-feature span { font-size: .75rem; color: #cbd5e1; }

.hd-login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
@media (min-width: 576px) { .hd-login-form-wrap { padding: 3rem; } }
.hd-login-form { width: 100%; max-width: 27rem; }

.hd-login-mark {
    display: flex; align-items: center; justify-content: center; gap: .75rem;
    margin-bottom: 2rem;
}
@media (min-width: 992px) { .hd-login-mark { display: none; } }
.hd-login-mark .hd-brand-name { color: var(--hd-ink); }
.hd-login-mark .hd-brand-sub { color: var(--hd-muted); }
.hd-login-mark .hd-brand-mark { border: 1px solid var(--hd-line-soft); }

.hd-login-card {
    background: #fff;
    border: 1px solid var(--hd-line-soft);
    border-radius: 1rem;
    box-shadow: 0 12px 40px -16px rgba(15, 23, 42, .25);
    padding: 2rem;
}
.hd-login-card h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.hd-login-card .hd-login-lead { color: var(--hd-muted); font-size: .875rem; margin-bottom: 1.75rem; }

.hd-input-icon { position: relative; }
.hd-input-icon > i:first-child {
    position: absolute;
    left: .875rem; top: 50%;
    transform: translateY(-50%);
    color: var(--hd-muted);
    font-size: .875rem;
    pointer-events: none;
}
.hd-input-icon .form-control { padding-left: 2.5rem; }
.hd-input-icon .hd-eye {
    position: absolute;
    right: .875rem; top: 50%;
    transform: translateY(-50%);
    border: 0; background: none; padding: 0;
    color: var(--hd-muted);
    cursor: pointer;
}
.hd-input-icon .hd-eye:hover { color: var(--hd-ink); }

.hd-login-submit {
    width: 100%;
    padding: .75rem 1rem;
    border: 0;
    border-radius: .5rem;
    background: var(--hd-ink);
    color: #fff;
    font-size: .875rem; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.hd-login-submit:hover { background: #1e293b; color: #fff; }

.hd-login-hint {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: .75rem;
}
.hd-login-hint i { color: #b45309; margin-top: .125rem; }
.hd-login-hint p { margin: 0; font-size: .75rem; color: #92400e; line-height: 1.6; }

/* ---------------------------------------------------------------------
   7. Rapi di tablet & ponsel
   --------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .card-body, .card-dashboard { padding: 1rem; }
    .card-header { padding: .875rem 1rem; }
    .table > thead > tr > th, .table > tbody > tr > td { padding: .625rem .75rem; }
    .hd-hero { padding: 1.25rem; }
    .hd-login-card { padding: 1.5rem; }
    /* Deret tombol/saringan ikut menggeser, bukan meluber. */
    .table-top, .wordset { width: 100%; }
    .search-box { max-width: none; }
}

/* Penyesuaian ponsel (≤576px) — dipindahkan dari admin-theme.css supaya
   tombol aksi dan kepala kartu tetap rapi di layar sempit. */
@media (max-width: 576px) {
    /* Tombol aksi jangan mendominasi layar. */
    .page-header .btn,
    .table-top .wordset .btn,
    .card-header .btn,
    .card-body > .d-flex .btn { font-size: .8125rem; padding: .375rem .75rem; line-height: 1.4; }

    /* Deret tombol (Tambah / Export / Refresh) membungkus, bukan meluber. */
    .table-top { gap: .75rem; }
    .wordset ul { display: flex; flex-wrap: wrap; gap: .5rem; padding-left: 0; margin: 0; list-style: none; }
    .wordset ul li { margin: 0; }
    .wordset ul li .btn { white-space: nowrap; }

    /* Tombol selebar kartu (Setujui/Tolak/Proses) jangan setinggi tombol besar. */
    .card-body .btn.w-100 { font-size: .84375rem; padding: .4375rem .75rem; }

    /* Kepala kartu yang memuat judul + tombol ikut membungkus. */
    .card-header.d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }
    .card-header .card-title { font-size: .9375rem; }

    .page-header .page-title { font-size: 1.125rem; }
    .tkt-card { padding: .75rem .8125rem; }
    .tkt-card .kc-ic { width: 2.5rem; height: 2.5rem; font-size: 1rem; }
    .tkt-card .kc-n { font-size: 1.3125rem; }
}

/* Sentuhan jari: target minimal 44px sesuai WCAG 2.5.5. */
@media (pointer: coarse) {
    .btn, .hd-icon-btn, .hd-nav-link, .dropdown-item { min-height: 2.75rem; }
    .btn-sm { min-height: 2.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Cetak: kerangka disembunyikan, hanya isi yang keluar. */
@media print {
    .hd-sidebar, .hd-topbar, .hd-footer, .hd-overlay { display: none !important; }
    .hd-main { margin-left: 0 !important; }
    .hd-content { padding: 0 !important; }
    .card { border: 1px solid #ddd; box-shadow: none; }
}
