/**
 * Core System / Module
 *
 * Designed and Developed by Muhammad Raffi Athallah Miraza, S.Kom.
 * Created for internal operations at PT Karya Tetangga Tuku.
 *
 * @author     Muhammad Raffi Athallah Miraza, S.Kom.
 * @copyright  Copyright (c) 2025-2026 PT Karya Tetangga Tuku. All Rights Reserved.
 *
 * Licensed under Proprietary License. See LICENSE file for details.
 */

/* ===================================
   ITS SuperApp - Design System
   "ITS Business" — light-first corporate
   (dark = full parity, grey = functional)
   =================================== */

/* ---- Import Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables (default = Dark) ---- */
:root {
    /* Backgrounds */
    --bg-primary: #0D1424;
    --bg-secondary: #111A2E;
    --bg-card: #131C30;
    --bg-input: #101828;
    --bg-sidebar: #0B1322;
    --bg-hover: #1B2740;

    /* Borders */
    --border: #22304B;
    --border-light: #2E3D5C;
    --border-focus: #3B82F6;

    /* Text */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-heading: #E2E8F0;

    /* Accent Colors */
    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-light: rgba(59, 130, 246, 0.15);
    --accent-glow: rgba(59, 130, 246, 0.3);

    /* Status Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info: #06B6D4;
    --info-bg: rgba(6, 182, 212, 0.15);
    --purple: #8B5CF6;
    --purple-bg: rgba(139, 92, 246, 0.15);

    /* Surfaces & elevation */
    --bg-body: var(--bg-primary);
    --surface-raised: var(--bg-card);
    --surface-overlay: #17233C;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.55);

    /* Sizing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --radius-lg: 16px;
    --sidebar-width: 250px;
    --header-h: 64px;
    --content-max: 1320px;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 48px;

    /* Type scale */
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-lg: 16px;

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* ---- Light Theme (flagship) ---- */
[data-theme="light"] {
    /* Backgrounds */
    --bg-primary: #F4F6FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-hover: #F1F4F9;

    /* Borders */
    --border: #E5E9F0;
    --border-light: #D8DEE9;
    --border-focus: #3B82F6;

    /* Text */
    --text-primary: #1F2937;
    --text-secondary: #5B6472;
    --text-muted: #8A94A6;
    --text-heading: #111827;

    /* Status Colors (stronger for light bg) */
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.1);
    --warning: #D97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --danger: #DC2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --info: #0891B2;
    --info-bg: rgba(8, 145, 178, 0.1);
    --purple: #7C3AED;
    --purple-bg: rgba(124, 58, 237, 0.1);

    /* Surfaces & elevation */
    --surface-overlay: #FFFFFF;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, 0.10);
    --shadow-lg: 0 16px 40px -8px rgba(16, 24, 40, 0.16);
}

/* ---- Grey Theme (functional parity) ---- */
[data-theme="grey"] {
    /* Backgrounds */
    --bg-primary: #2A2D35;
    --bg-secondary: #33363F;
    --bg-card: #3A3D47;
    --bg-input: #33363F;
    --bg-sidebar: #2A2D35;
    --bg-hover: #44475250;

    /* Borders */
    --border: #4A4D57;
    --border-light: #5A5D67;
    --border-focus: #3B82F6;

    /* Text */
    --text-primary: #E8EAF0;
    --text-secondary: #B0B4C0;
    --text-muted: #808490;
    --text-heading: #F0F2F8;

    /* Status Colors */
    --success: #10B981;
    --success-bg: rgba(16, 185, 129, 0.18);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.18);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.18);
    --info: #06B6D4;
    --info-bg: rgba(6, 182, 212, 0.18);
    --purple: #8B5CF6;
    --purple-bg: rgba(139, 92, 246, 0.18);

    /* Surfaces & elevation */
    --surface-overlay: #3F424D;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 6px 16px -4px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.5);
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    padding-top: var(--banner-height, 0px);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.375rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.125rem;
}

h4 {
    font-size: 1rem;
}

/* Business-dashboard numeric alignment */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

.u-right {
    text-align: right;
}

/* ---- Layout Utilities ---- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}

.gap-xl {
    gap: 32px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-sm);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

.btn-success:hover {
    background: #059669;
    color: #fff;
}

.btn-outline {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ---- Form Elements ---- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* [FASE 35 - B1] Penanda field wajib.
   Ditulis sebagai elemen TERPISAH di luar {{ $t['form.*'] }}, bukan disisipkan
   ke dalam teks terjemahannya - kalau bintangnya ikut masuk ke baris DB, setiap
   penyuntingan lewat Translation Editor berisiko menghilangkannya, dan
   penerjemah harus ingat mengetiknya kembali.
   aria-hidden dipasang di markup: pembaca layar sudah mengumumkan wajib/tidak
   dari atribut `required` pada input-nya, jadi membacakan "bintang" hanya
   menambah kebisingan. */
.req {
    color: var(--danger);
    font-weight: 700;
    margin-left: 3px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    padding-left: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.form-textarea {
    padding-left: 14px;
    resize: vertical;
    min-height: 100px;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.input-icon-wrapper .form-select {
    padding-left: 40px;
}

.form-input.no-icon,
.form-textarea.no-icon {
    padding-left: 14px;
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    gap: 5px;
    border: 1px solid color-mix(in srgb, currentColor 25%, transparent);
    line-height: 1.6;
    white-space: nowrap;
}

/* [FASE 35 - A2] Palet badge status.
   Warnanya sekarang SAMA PERSIS dengan App\Support\TicketStatus::META, sehingga
   badge di tabel dan kartu statistik di dashboard tidak lagi bercerita beda
   tentang status yang sama.
   Dua perbaikan yang ikut di sini:
   1. `.badge-completed` sebelumnya TIDAK ADA. Nilai statusnya `completed` sejak
      migrasi 2026_02_21, tapi CSS-nya masih bernama `.badge-complete` - jadi
      SETIAP badge tiket selesai dirender tanpa gaya sama sekali dan tidak ada
      yang menyadarinya. `.badge-complete` dipertahankan sebagai alias.
   2. `.badge-received` untuk status baru. Tanpa kelas ini setiap tiket baru
      akan tampil sebagai badge polos. */
.badge-received {
    background: rgba(99, 102, 241, 0.15);
    color: #6366F1;
}

.badge-queued {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
}

[data-theme="light"] .badge-queued {
    background: rgba(139, 92, 246, 0.12);
    color: #6D28D9;
}

.badge-open {
    background: rgba(6, 182, 212, 0.15);
    color: #06B6D4;
}

[data-theme="light"] .badge-open {
    background: rgba(6, 182, 212, 0.12);
    color: #0E7490;
}

.badge-process {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

[data-theme="light"] .badge-process {
    background: rgba(245, 158, 11, 0.12);
    color: #B45309;
}

.badge-hold {
    background: rgba(100, 116, 139, 0.15);
    color: #64748B;
}

/* [FASE 35] Escalate & Monitor sudah dipensiunkan dari kosakata status.
   Kelasnya SENGAJA dipertahankan, bukan dihapus: barisan tiket historis di
   instalasi yang belum menjalankan migrasi 2026_09_02_000002 masih bisa
   memakainya, dan badge tanpa gaya lebih membingungkan daripada badge lama. */
.badge-escalate {
    background: rgba(236, 72, 153, 0.15);
    color: #EC4899;
}

.badge-monitor {
    background: rgba(20, 184, 166, 0.15);
    color: #14B8A6;
}

.badge-completed,
.badge-complete {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.badge-rejected {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* Keep badge-solved as alias for backward compat in non-ticket contexts */
.badge-solved {
    background: var(--success-bg);
    color: var(--success);
}

.badge-low {
    color: var(--success);
}

.badge-medium {
    color: var(--warning);
}

.badge-high {
    color: #F97316;
}

.badge-urgent {
    color: var(--danger);
}

/* ---- Priority Dot ---- */
.priority-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.priority-dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.priority-dot.low::before {
    background: var(--success);
}

.priority-dot.medium::before {
    background: var(--warning);
}

.priority-dot.high::before {
    background: #F97316;
}

.priority-dot.urgent::before {
    background: var(--danger);
}

/* ---- Tables ---- */
.table-wrapper,
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table th:first-child {
    border-top-left-radius: var(--radius-sm);
}

.data-table th:last-child {
    border-top-right-radius: var(--radius-sm);
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* ---- Avatar ---- */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.avatar-blue {
    background: var(--accent);
}

.avatar-green {
    background: var(--success);
}

.avatar-orange {
    background: #F97316;
}

.avatar-purple {
    background: var(--purple);
}

/* =================================
   PUBLIC PAGES
   ================================= */

/* ---- Public Header ---- */
.public-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.public-header .container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Public Footer ---- */
.public-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: auto;
}

.public-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-text {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 12px;
}

.footer-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}

.footer-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- Home Page Layout ---- */
/*
 * [FASE 40 - B2] Tombol Masuk kini anak grid KETIGA (dipindah keluar dari
 * .hero-section di home.blade.php), supaya di layar sempit ia bisa turun ke
 * BAWAH form. `order` tidak bisa dipakai untuk itu: order hanya bekerja
 * antar-saudara dalam satu kontainer, sementara dulu tombolnya bersarang di
 * dalam kolom kiri.
 *
 * Tampilan desktop TIDAK berubah. .form-section merentang dua baris, dan
 * menurut aturan penentuan ukuran track CSS Grid, item yang merentang track
 * fleksibel (1fr) tidak menambah ukuran intrinsik track `auto` yang ikut
 * direntangnya - jadi baris 1 tetap setinggi .hero-section dan tombol Masuk
 * duduk tepat di bawahnya, sama seperti sebelumnya.
 *
 * row-gap SENGAJA 0: jarak vertikalnya sudah diatur margin tiap elemen
 * (.search-ticket-box margin-bottom, .login-action-box margin-top). Memberi
 * row-gap berarti menumpuk di atas margin itu dan mengubah kerapatan halaman.
 *
 * Seluruh kelas di blok ini HANYA dipakai resources/views/public/home.blade.php.
 */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "hero  form"
        "login form";
    grid-template-rows: auto 1fr;
    column-gap: 32px;
    row-gap: 0;
    min-height: calc(100vh - 110px);
    padding: 16px 0;
    align-items: start;
}

/* ---- Hero Section (Left) ---- */
.hero-section {
    grid-area: hero;
    padding-top: 24px;
}

/* [FASE 40 - B2] Tombol Masuk: anak grid ketiga. margin-top dipindah ke sini
 * dari atribut style inline supaya media query bisa menimpanya tanpa
 * !important.
 *
 * [FASE 41 - A1] display/justify-content/width IKUT dipindah ke sini dengan
 * alasan yang sama - selama display:flex masih di atribut style inline, aturan
 * di bawah ini mustahil menyembunyikannya. Di desktop tombol ini TIDAK
 * dirender; penggantinya .header-login-btn di header kanan atas. Area grid
 * "login" yang kosong tetap sah (sudah terjadi tiap kali pengguna login). */
.login-action-box {
    grid-area: login;
    margin-top: 24px;
    display: none;
    justify-content: center;
    width: 100%;
}

/* [FASE 41 - A1] Tombol Masuk di header - HANYA desktop.
 *
 * Padding, radius, dan ukuran font sengaja disamakan dengan tombol akun
 * .user-greeting di layouts/public.blade.php, supaya tinggi header persis sama
 * antara pengunjung tamu dan pengguna yang sudah login (tidak ada pergeseran
 * header saat login/logout).
 *
 * Kelas ini hanya diisi oleh resources/views/public/home.blade.php lewat
 * @yield('header-actions'); 12 view lain yang memakai layout itu tidak
 * merender apa pun. */
.header-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    border: 1px solid var(--accent);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    white-space: nowrap;
}

.header-login-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}

.header-login-btn:active {
    transform: translateY(0);
}

.header-login-btn i {
    font-size: 13px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
    color: var(--success);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-title .highlight {
    color: var(--accent);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 420px;
}

/* ---- Search Ticket Box ---- */
.search-ticket-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.search-ticket-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.search-ticket-subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.search-ticket-form {
    display: flex;
    gap: 12px;
}

.search-ticket-form .form-input {
    flex: 1;
}

.search-ticket-form .btn {
    min-width: 80px;
}

/* ---- Feature Cards ---- */
.feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
}

.feature-icon.blue {
    background: var(--accent-light);
    color: var(--accent);
}

.feature-icon.green {
    background: var(--success-bg);
    color: var(--success);
}

.feature-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Form Section (Right) ---- */
.form-section {
    grid-area: form;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.form-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-required-badge {
    padding: 4px 12px;
    background: var(--accent-light);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-xs);
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

/* ---- File Upload Area ---- */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-area:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-area.dragover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.upload-icon {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.upload-text {
    color: var(--text-secondary);
    font-size: 14px;
}

.upload-text .link {
    color: var(--accent);
    font-weight: 500;
}

.upload-hint {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

.upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

/* [FASE 36 - A3] Lampiran yang terdeteksi berbahaya.
   Dipakai bersama halaman tiket admin dan halaman /track publik, jadi seluruhnya
   berbasis token tema - tidak ada satu pun warna keras yang dipatok, supaya
   tema light, grey, dan dark ikut otomatis. */
.attachment-threat-card {
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.06);
}

.attachment-threat-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.attachment-threat-head > i {
    color: var(--danger);
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.attachment-threat-head strong {
    display: block;
    color: var(--danger);
    font-size: 14px;
}

.attachment-threat-head span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
    word-break: break-all;
}

.attachment-threat-sig {
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
    opacity: 0.85;
}

.attachment-threat-ask {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.attachment-threat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* Keadaan "belum diperiksa" / "tidak dapat diperiksa". Sengaja netral, bukan
   merah: ini bukan temuan ancaman, hanya hasil yang belum ada. Memakai merah
   akan menumpulkan makna merah pada kartu ancaman di atas. */
.attachment-scan-badge {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--warning-light, rgba(245, 158, 11, 0.14));
    color: var(--warning, #B45309);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.uploaded-file-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploaded-file-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

/* ---- CAPTCHA ---- */
.captcha-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
}

.captcha-question {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-label {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.captcha-input {
    width: 80px;
    text-align: center;
    padding: 10px !important;
    padding-left: 10px !important;
    font-size: 16px;
    font-weight: 600;
}

/* ---- Success Page ---- */
.success-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--success);
}

.success-card h2 {
    margin-bottom: 12px;
}

.success-card p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.ticket-id-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 24px;
    margin-bottom: 24px;
}

.ticket-id-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

.copy-btn {
    background: var(--accent-light);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-xs);
    padding: 6px 12px;
    color: var(--accent);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* ---- Tracking Page ---- */
.tracking-page {
    padding: 48px 0;
    max-width: 800px;
    margin: 0 auto;
}

.tracking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.tracking-ticket-id {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 14px;
    color: var(--text-primary);
}

/* ---- Timeline ---- */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.timeline-dot.created {
    background: var(--accent-light);
    color: var(--accent);
    border: 2px solid var(--accent);
}

.timeline-dot.assigned {
    background: var(--warning-bg);
    color: var(--warning);
    border: 2px solid var(--warning);
}

.timeline-dot.open {
    background: var(--info-bg);
    color: var(--info);
    border: 2px solid var(--info);
}

.timeline-dot.solved {
    background: var(--success-bg);
    color: var(--success);
    border: 2px solid var(--success);
}

.timeline-dot.rejected {
    background: var(--danger-bg);
    color: var(--danger);
    border: 2px solid var(--danger);
}

.timeline-dot.status_changed {
    background: var(--warning-bg);
    color: var(--warning);
    border: 2px solid var(--warning);
}

.timeline-dot.completed {
    background: var(--success-bg);
    color: var(--success);
    border: 2px solid var(--success);
}

.timeline-dot.follow_up {
    background: var(--purple-bg);
    color: var(--purple);
    border: 2px solid var(--purple);
}

.timeline-dot.escalated {
    background: var(--warning-bg);
    color: var(--warning);
    border: 2px solid var(--warning);
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.timeline-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---- Resolution Notes ---- */
.resolution-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-top: 24px;
}

.resolution-box h4 {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resolution-box p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
}

.resolution-empty {
    color: var(--text-muted);
    font-style: italic;
}

/* =================================
   ADMIN PAGES
   ================================= */

/* ---- Admin Login ---- */
.login-page {
    min-height: calc(100vh - 115px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(1000px 500px at 85% -10%, var(--accent-light), transparent 60%),
        radial-gradient(800px 420px at -10% 110%, var(--accent-light), transparent 55%),
        var(--bg-body);
}

/* ---- [FASE 14] Login photo backdrop ----
   Every rule is prefixed with body.has-login-bg, so the five OTHER pages that
   reuse .login-page (gate, admin login / 2FA / set-password) are untouched. The
   photo layer is position:fixed so it fills header-to-footer; the login card
   (z-index:2) and peeking bird (z-index:1) stay in front of it (z-index:-1). */
.login-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* [FASE 16] Proteksi standar. Ini background CSS, bukan <img>, sehingga
       menu "Save image as" memang sudah tidak muncul. Dua baris berikut menutup
       sisa jalur yang mudah: long-press di iOS/Android yang memunculkan menu
       simpan, dan seleksi/seret di desktop. pointer-events:none memastikan
       lapisan ini tidak pernah menangkap klik walau tata letak berubah.
       Ini menghalangi pengguna biasa — screenshot dan tab Network tetap bisa. */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
.login-bg-layer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, var(--login-bg-scrim, 0.45));
}
body.has-login-bg { background-color: transparent; }
/* Drop the default radial gradient so the photo shows through. */
body.has-login-bg .login-page { background: none; }
/* Frost the chrome so it reads cleanly over any photo. */
body.has-login-bg .public-header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.has-login-bg .public-global-footer {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.has-login-bg .login-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
}
/* Keep the card text dark on the frosted-white card regardless of theme. */
body.has-login-bg .login-card h2,
body.has-login-bg .login-card .login-subtitle,
body.has-login-bg .login-card label { color: #0F172A; }

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: #fff;
}

.login-card h2 {
    margin-bottom: 8px;
}

.login-card .login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

.login-form .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.login-footer {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ---- Admin Layout ---- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--banner-height, 0px);
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: var(--transition-slow);
}

.sidebar-header {
    min-height: var(--header-h);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition-slow);
}

.sidebar-brand {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-version {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section-title {
    padding: 8px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 2px 10px;
    border-radius: 10px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.sidebar-link:hover {
    background: var(--accent-light);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-link:hover i {
    color: var(--accent);
}

/* Modern "pill" active state: soft accent tint + left accent bar (no heavy solid fill) */
.sidebar-link.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 65%;
    border-radius: 0 4px 4px 0;
    background: var(--accent);
}

.sidebar-link.active i {
    color: var(--accent);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
    transition: color 0.2s ease;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .sidebar-link {
    padding: 10px 0;
}

/* ---- Admin Main Content ---- */
.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ---- Topbar ---- */
.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    min-height: var(--header-h);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: var(--banner-height, 0px);
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.topbar-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-heading);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-notification {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.topbar-notification:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-user-info {
    text-align: right;
}

.topbar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* [FASE 41 - B2] Penanda hanya-baca untuk role Supervisor di topbar admin.
 * EnforceReadOnlyRole menolak setiap tulis dari role ini dengan 403; tanpa
 * penanda permanen, tombol yang gagal terbaca sebagai sistem rusak. */
.topbar-readonly-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    color: #B45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: default;
}

.topbar-readonly-pill i {
    font-size: 10px;
}

@media (max-width: 640px) {
    .topbar-readonly-pill {
        font-size: 10px;
        padding: 4px 8px;
    }
}

.topbar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
}

/* ---- Dashboard Content ---- */
.admin-content {
    flex: 1;
    padding: 24px;
    background: var(--bg-primary);
    overflow-x: hidden;
    min-width: 0;
}

/* ---- Stat Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.stat-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-heading);
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

.stat-change.neutral {
    color: var(--text-muted);
}

.stat-change.ok {
    color: var(--success);
}

/* ---- Chart Section ---- */
.chart-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-title h3 {
    margin-bottom: 4px;
}

.chart-title p {
    color: var(--text-muted);
    font-size: 13px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.chart-filter select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}

.chart-container {
    height: 280px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

/* ---- Recent Table Section ---- */
.recent-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* ---- Alert Messages ---- */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    color: var(--text-primary);
}

.pagination .active span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

/* ---- Paginator aplikasi (resources/views/pagination/its.blade.php) ----
   Menumpang .pagination di atas untuk bentuk pilnya; hanya keadaan aktif/
   nonaktif dan pembungkusnya yang baru. Aturan .pagination lama TIDAK diubah
   karena dua view admin (settings/files, tickets/index) menuliskan markup
   paginasinya sendiri dengan kelas yang sama. */
.its-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.its-pagination-info {
    margin: 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.its-pagination-info strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.its-pagination .pagination {
    margin-top: 0;
    flex-wrap: wrap;
}

.its-page {
    text-decoration: none;
    gap: 5px;
}

.its-page.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: var(--shadow-xs);
}

.its-page.is-disabled {
    opacity: .38;
    cursor: default;
    pointer-events: none;
}

.its-page.is-gap {
    pointer-events: none;
    color: var(--text-muted);
}

/* Jaring pengaman: SVG di dalam paginator tidak boleh memuai.
   View kita sudah menulis width/height sebagai ATRIBUT sehingga benar walau
   stylesheet gagal dimuat; aturan ini menutup jalur kedua — kalau suatu saat
   ada kode yang me-render view Tailwind bawaan Laravel (yang menyandarkan
   ukuran pada kelas `w-5 h-5` yang tidak pernah ada di aplikasi ini), panah
   raksasa itu tidak bisa lahir kembali. */
.its-pagination svg,
nav[aria-label*="Pagination" i] svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

@media (max-width: 560px) {
    .its-pagination { justify-content: center; }
    .its-pagination-info { width: 100%; text-align: center; }
}

/* ---- Modal ---- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-backdrop.show {
    display: flex;
}

.modal {
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ---- Hamburger for Mobile ---- */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /*
     * [FASE 40 - B3] grid-template-areas WAJIB ditimpa di setiap breakpoint
     * yang meruntuhkan layout ke 1 kolom. Kalau tidak, peta area yang masih
     * menyebut dua kolom akan MEMBUAT kolom implisit kedua walaupun
     * grid-template-columns hanya 1fr - hasilnya layout 2 kolom di HP.
     * grid-template-rows juga wajib di-reset: tanpa itu baris kedua tetap 1fr
     * dan menganga selebar sisa min-height.
     */
    .home-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "form"
            "login";
        grid-template-rows: none;
        column-gap: 0;
        row-gap: 0;
        padding: 32px 0;
    }

    /* [FASE 41 - A1] Di bawah desktop, tombol Masuk kembali ke bawah form -
     * persis hasil Fase 40 yang sudah lolos QA - dan tombol header hilang.
     * Breakpoint disamakan dengan titik layout ini runtuh jadi 1 kolom, bukan
     * angka baru yang berdiri sendiri. */
    .header-login-btn {
        display: none;
    }

    .login-action-box {
        display: flex;
    }

    /* 993-1024px: layout sudah 1 kolom tapi kartu fitur masih tampil (baru
     * disembunyikan di <=992px), dan .feature-cards tidak punya margin-bottom
     * sendiri - tanpa baris ini ia menempel ke form. */
    .feature-cards {
        margin-bottom: 32px;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .admin-main {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .captcha-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-user-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .feature-cards {
        grid-template-columns: 1fr;
    }

    .search-ticket-form {
        flex-direction: column;
    }

    .hero-title {
        font-size: 1.8rem;
    }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* ---- Toast Notification ---- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Page Header (Admin inner pages) ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 20px;
    letter-spacing: -0.01em;
}

.page-header .page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* ---- Ticket Detail (Admin) ---- */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.ticket-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Settings Pages ---- */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =================================
   TRANSLATION EDITOR
   ================================= */

/* ---- Group Pills ---- */
.translation-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.translation-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.translation-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.translation-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pill-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 7px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.translation-pill.active .pill-count {
    background: rgba(255, 255, 255, 0.25);
}

/* ---- Translation Table ---- */
.translation-table td {
    vertical-align: top;
    padding: 10px 12px;
}

.translation-table th {
    padding: 12px;
}

.group-tag {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.translation-key {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12.5px;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.lang-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-left: 6px;
    vertical-align: middle;
}

.lang-badge.primary {
    background: var(--accent-light);
    color: var(--accent);
}

.lang-badge.secondary {
    background: var(--success-bg);
    color: var(--success);
}

/* ---- Translation Inputs ---- */
.translation-cell {
    position: relative;
}

.translation-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.5;
    padding: 8px 12px;
    resize: none;
    overflow: hidden;
    transition: var(--transition);
    outline: none;
}

.translation-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}

.translation-input.changed {
    border-color: var(--warning);
    box-shadow: 0 0 0 2px var(--warning-bg);
    background: rgba(245, 158, 11, 0.05);
}

.en-input {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}

.en-input:focus {
    background: var(--bg-card);
    border-color: var(--accent);
}

.id-cell .edit-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.5;
    pointer-events: none;
    transition: var(--transition);
}

.id-cell:hover .edit-icon {
    opacity: 1;
    color: var(--success);
}

.btn-icon-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 13px;
}

.btn-icon-delete:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

/* =================================
   USER DROPDOWN MENU
   ================================= */

.topbar-user-dropdown {
    position: relative;
}

.topbar-user-dropdown .topbar-user {
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}

.topbar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 100;
}

.topbar-user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: none;
    border: none;
    font-family: inherit;
    width: 100%;
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item.danger:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* =================================
   PROFILE PAGE
   ================================= */

.profile-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

.profile-avatar-card {
    text-align: center;
    padding: 32px 24px;
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--accent);
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
}

.profile-forms {
    min-width: 0;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.avatar-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-upload-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--border);
    flex-shrink: 0;
    color: var(--text-muted);
}

.avatar-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .form-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* =================================
   SIDEBAR LOGO
   ================================= */

.sidebar-logo {
    height: 36px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* =================================
   THEME TOGGLE & COLOR PALETTE
   ================================= */

.theme-toggle-group {
    display: flex;
    gap: 8px;
}

.theme-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.theme-option input {
    display: none;
}

.theme-option:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.theme-option.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--swatch-color);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid transparent;
    transition: var(--transition);
}

.color-swatch input {
    display: none;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.color-swatch i {
    color: #fff;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* =================================
   LIGHT THEME SPECIFIC OVERRIDES
   ================================= */

[data-theme="light"] .sidebar {
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .topbar {
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

[data-theme="light"] .data-table th {
    background: var(--bg-primary);
    color: var(--text-secondary);
}

[data-theme="light"] .data-table td {
    border-bottom: 1px solid var(--border);
}

[data-theme="light"] .sidebar-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

[data-theme="light"] .stat-card {
    border: 1px solid var(--border);
}

[data-theme="light"] .form-select,
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
    border: 1px solid var(--border-light);
}

[data-theme="light"] .btn-outline {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

[data-theme="light"] .btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: var(--border-light);
}

[data-theme="light"] .public-header {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .public-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--border);
}

[data-theme="light"] .hero-title {
    color: #0F172A;
}

[data-theme="light"] .search-ticket-box {
    border: 1px solid var(--border);
}

[data-theme="light"] .feature-card {
    border: 1px solid var(--border);
}

[data-theme="light"] .form-section {
    border: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .upload-area {
    border-color: var(--border-light);
    background: var(--bg-primary);
}

[data-theme="light"] .badge {
    font-weight: 600;
}

[data-theme="light"] .user-dropdown-menu {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
}

/* =================================
   SETTINGS SUB-NAVIGATION LAYOUT
   ================================= */

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

.settings-subnav {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 8px;
    position: sticky;
    top: 20px;
}

.settings-subnav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.settings-subnav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.settings-subnav-link.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

.settings-subnav-link i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.settings-content {
    min-width: 0;
}

@media (max-width: 768px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-subnav {
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 4px;
    }

    .settings-subnav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* =================================
   ADMIN FOOTER
   ================================= */

.admin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.admin-footer-copyright {
    opacity: 0.8;
}

.admin-footer-version {
    font-family: 'Inter', monospace;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-hover);
    padding: 3px 10px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    letter-spacing: 0.3px;
}

/* =================================
   VERSION INFO CARD
   ================================= */

.version-info-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px 0;
    margin-top: 16px;
}

.version-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.version-info-row:last-child {
    border-bottom: none;
}

.version-info-label {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-info-label i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.version-info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
}

/* =================================
   SIDEBAR LOGOUT BUTTON
   ================================= */

.sidebar-logout-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* =================================
   LIGHT THEME: NEW ELEMENTS
   ================================= */

[data-theme="light"] .admin-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--border);
}

[data-theme="light"] .settings-subnav {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .settings-subnav-link.active {
    background: var(--accent-light);
}

[data-theme="light"] .version-info-card {
    background: var(--bg-primary);
}

[data-theme="light"] .admin-footer-version {
    background: var(--bg-hover);
}

/* =================================
   NOTIFICATION BELL & POPUP
   ================================= */

.notif-dropdown {
    position: relative;
}

.topbar-notification {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.topbar-notification:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.notif-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 320px;
    background: var(--surface-overlay);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
}

.notif-dropdown.open .notif-popup {
    display: block;
    animation: dropdownFade 0.15s ease;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-popup-header a {
    color: var(--accent);
    text-decoration: none;
}

.notif-popup-body {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.notif-item-info {
    min-width: 0;
    flex: 1;
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.notif-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.notif-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* =================================
   FILE PREVIEW & LIGHTBOX
   ================================= */

.attachment-preview-card {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-input);
}

.attachment-image-wrap {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
}

.attachment-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.attachment-image-wrap:hover img {
    transform: scale(1.02);
}

.attachment-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.attachment-image-wrap:hover .attachment-image-overlay {
    opacity: 1;
}

.attachment-pdf-wrap {
    border-bottom: 1px solid var(--border);
}

.attachment-pdf-wrap embed {
    display: block;
}

.attachment-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    gap: 12px;
}

.attachment-info-row>div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.attachment-info-row>div>span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Lightbox Modal */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* =================================
   LOADING OVERLAY ANIMATION
   ================================= */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 32, 0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.loading-spinner svg {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg);
}

.loading-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 6;
}

.loading-progress {
    fill: none;
    stroke: var(--accent, #3B82F6);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.15s ease;
    filter: drop-shadow(0 0 8px var(--accent-glow, rgba(59, 130, 246, 0.4)));
}

.loading-percent {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
}

/* =================================
   RESPONSIVE FIXES
   ================================= */

.table-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

.ticket-detail-grid {
    min-width: 0;
}

.ticket-detail-grid>div {
    min-width: 0;
}

/* =================================
   LIGHT THEME: PHASE 8 OVERRIDES
   ================================= */

[data-theme="light"] .loading-overlay {
    background: rgba(248, 250, 252, 0.95);
}

[data-theme="light"] .loading-percent {
    color: var(--text-primary);
}

[data-theme="light"] .loading-text {
    color: var(--text-secondary);
}

[data-theme="light"] .loading-track {
    stroke: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .notif-popup {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .attachment-preview-card {
    background: #F8FAFC;
}

/* ---- Admin Sidebar Minimize Extension ---- */
.sidebar.minimized {
    width: 70px;
}

.sidebar.minimized .sidebar-header {
    justify-content: center;
    padding: 20px 0;
}

.sidebar.minimized .sidebar-toggle-wrapper {
    justify-content: center !important;
    padding: 14px 0 0 !important;
}

.sidebar.minimized .sidebar-toggle-btn {
    justify-content: center;
    width: 26px !important;
    margin: 0 auto;
}

.sidebar.minimized .sidebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebar.minimized .sidebar-brand,
.sidebar.minimized .sidebar-version {
    display: none;
}

.sidebar.minimized .sidebar-section-title {
    display: none;
}

.sidebar.minimized .sidebar-link .link-text {
    display: none;
}

.sidebar.minimized .sidebar-link {
    padding: 12px 0;
    justify-content: center;
    transform: none;
}

.sidebar.minimized .sidebar-link:hover {
    transform: none;
}

/* In icon-only mode the pill becomes a centered accent square; drop the side bar */
.sidebar.minimized .sidebar-link.active::before {
    display: none;
}

.sidebar.minimized .sidebar-link i {
    margin-right: 0;
    font-size: 20px;
}

.sidebar.minimized~.admin-main {
    margin-left: 70px;
}

[data-theme="light"] .sidebar.minimized~.admin-main {
    margin-left: 70px;
}

/* =================================
   RESPONSIVE LAYOUT
   ================================= */
@media (max-width: 992px) {
    /* Peta area & grid-template-rows sudah di-set blok <=1024px di atas dan
     * tetap berlaku di sini; yang perlu ditimpa hanya jaraknya. */
    .home-layout {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 0;
        padding: 16px 0;
    }

    /* [FASE 40 - B4] Kartu "Terpadu"/"Akurat" disembunyikan di HP & tablet
     * potret (permintaan pemilik produk). Markup-nya tetap di DOM, jadi
     * tampilan desktop tidak berubah sama sekali. */
    .feature-cards {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .home-layout {
        min-height: auto;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .form-section {
        padding: 20px;
    }
}

/* =================================
   POP UP NOTIFICATION BANNER
   ================================= */

.popup-notification-banner {
    width: 100%;
    background: linear-gradient(90deg, var(--accent, #3B82F6), #7C3AED);
    color: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999;
    height: 36px;
    flex-shrink: 0;
}

.popup-notification-icon {
    padding: 0 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.15);
    height: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.popup-notification-marquee {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.popup-notification-marquee span {
    display: inline-block;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    animation: popupMarquee var(--marquee-speed, 20s) linear infinite;
    will-change: transform;
}

@keyframes popupMarquee {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ==========================================================================
   ITS SuperApp — Beranda (module selector)
   ========================================================================== */
.beranda-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}
.beranda-header {
    text-align: center;
    margin-bottom: 36px;
}
.beranda-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.beranda-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0 0 16px;
}
.beranda-welcome {
    color: var(--text-primary);
    font-size: 0.95rem;
}
.beranda-welcome i { color: var(--accent); margin-right: 4px; }
.beranda-role {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}
.beranda-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.module-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 14px);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}
.module-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.module-card-icon {
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 1.35rem;
}
.module-card-body { flex: 1 1 auto; min-width: 0; }
.module-card-name {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}
.module-card-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.module-card-arrow {
    flex: 0 0 auto;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.module-card:hover .module-card-arrow { opacity: 1; transform: translateX(0); }
.module-card-badge {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--warning);
    color: #1a1a1a;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
/* [FASE 36 - A4] Badge di atas SENGAJA absolute supaya tidak menggeser tata
   letak kartu, tapi ia tidak pernah memesan ruang untuk dirinya - sehingga pada
   nama modul yang panjang ("Procurement System", "Inventory Waste", dan kini
   "Internet Monitoring") judulnya tercetak DI BAWAH badge.
   Padding hanya dipasang saat badge-nya memang ada, jadi kartu aktif tidak
   berubah satu piksel pun. */
.module-card.is-coming-soon .module-card-name,
.module-card.is-disabled .module-card-name { padding-right: 108px; }
.module-card.is-coming-soon { opacity: 0.72; }
.module-card.is-coming-soon .module-card-icon { background: var(--text-muted); }
.module-card-settings { border-style: dashed; }
.beranda-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.beranda-empty i { font-size: 2rem; margin-bottom: 12px; display: block; }
.beranda-footer {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}
@media (max-width: 560px) {
    .beranda-grid { grid-template-columns: 1fr; }
    .beranda-title { font-size: 1.6rem; }
}

/* ==========================================================================
   ITS SuperApp — Vendor dashboard
   ========================================================================== */
.vendor-page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.vendor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}
.vendor-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.vendor-title i { color: var(--accent); margin-right: 6px; }
.vendor-sub { color: var(--text-muted); margin: 4px 0 0; font-size: 0.9rem; }
.vendor-actions { display: flex; gap: 8px; align-items: center; }
.vendor-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.vstat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    padding: 18px;
    text-align: center;
}
.vstat-num { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.vstat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.vendor-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    overflow-x: auto;
}
.vendor-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.vendor-table th {
    text-align: left;
    padding: 12px 14px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.vendor-table td {
    padding: 12px 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.vendor-table tbody tr:last-child td { border-bottom: none; }
.vendor-empty { text-align: center; color: var(--text-muted); padding: 28px 14px; }
.vbadge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}
.vbadge-open { background: var(--warning); color: #1a1a1a; }
.vbadge-done { background: var(--success); color: #fff; }
.vendor-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
    font-size: 0.85rem;
}
.vendor-pagination a { color: var(--accent); text-decoration: none; font-weight: 600; }
.vendor-pagination .disabled { color: var(--text-muted); opacity: 0.6; }
.vendor-page-info { color: var(--text-muted); }
.vendor-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    padding: 22px;
}
.vendor-detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.vendor-detail-row:last-of-type { border-bottom: none; }
.vendor-detail-label { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.vendor-detail-block { padding: 12px 0; border-top: 1px solid var(--border); margin-top: 6px; }
.vendor-detail-block p { margin: 6px 0 0; color: var(--text-primary); line-height: 1.5; white-space: pre-line; }
@media (max-width: 560px) {
    .vendor-stats { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ITS SuperApp — Coming Soon module placeholder
   ========================================================================== */
.coming-soon-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 64px 20px;
    text-align: center;
}
.coming-soon-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: var(--accent);
    color: #fff;
    font-size: 2.4rem;
}
.coming-soon-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--warning);
    color: #1a1a1a;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 14px;
}
.coming-soon-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}
.coming-soon-desc { color: var(--text-primary); font-size: 1rem; margin: 0 0 8px; }
.coming-soon-note { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 28px; }

/* ==========================================================================
   FASE 11 — "ITS BUSINESS" ADDITIONS
   Helper baru & polish lintas halaman. Tidak ada class lama yang di-rename.
   ========================================================================== */

/* ---- Page head pattern (judul kiri + aksi kanan) ---- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-head-titles h2 {
    font-size: 20px;
    letter-spacing: -0.01em;
    margin: 0;
}

.page-head-titles .page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.page-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ---- Filter bar (flat card di atas tabel) ---- */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}

/* ---- Card header hairline (untuk kartu dengan judul) ---- */
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.card-head h3,
.card-head h4 {
    margin: 0;
}

/* ---- Icon chip (stat card korporat) ---- */
.stat-icon-chip {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.module-card {
    box-shadow: var(--shadow-xs);
}

.module-card:hover {
    box-shadow: var(--shadow-md);
}

.module-card-badge {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}

/* ---- Vendor & module surfaces ikut elevasi baru ---- */
.vstat,
.vendor-table-wrap,
.vendor-detail-card {
    box-shadow: var(--shadow-xs);
}

/* ---- SweetAlert2 mengikuti tema (CSS-only, tanpa ubah opsi JS) ---- */
.swal2-popup {
    background: var(--surface-overlay) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}

.swal2-title {
    color: var(--text-heading) !important;
    font-size: 1.25rem !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    font-size: 0.92rem !important;
}

.swal2-styled.swal2-confirm {
    background-color: var(--accent) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-xs) !important;
}

/* [FASE 41 - C2] Varian destruktif.
 *
 * Aturan di atas memakai !important, sehingga opsi `confirmButtonColor` milik
 * SweetAlert2 DIABAIKAN diam-diam di seluruh aplikasi ini - tombol konfirmasi
 * sebuah dialog "hapus permanen" tampil dengan warna aksen yang sama persis
 * dengan dialog biasa. Kelas ini dipasang lewat customClass supaya niatnya
 * benar-benar terlihat, dan hanya berlaku pada dialog yang memintanya. */
.swal2-styled.swal2-confirm.swal-danger {
    background-color: #DC2626 !important;
    border-color: #DC2626 !important;
}

.swal2-styled.swal2-confirm.swal-danger:hover {
    background-color: #B91C1C !important;
}

.swal2-styled.swal2-cancel {
    border-radius: var(--radius-sm) !important;
}

.swal2-footer {
    border-top: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
}

/* ---- Helper opt-in: batasi lebar konten di monitor lebar ---- */
.content-cap {
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
}

/* ---- Fokus keyboard yang konsisten ---- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---- Selection ---- */
::selection {
    background: var(--accent-light);
    color: inherit;
}
/* ==========================================================================
   [FASE 15] Mini Tools — utilitas dokumen di /beranda
   --------------------------------------------------------------------------
   Dua permukaan: (1) baris kartu peluncur di bawah grid modul, (2) modal
   mandiri. Sengaja TIDAK memakai SweetAlert2 untuk modalnya — isinya
   multi-langkah (kanvas preview, kanvas tanda tangan, daftar berkas) yang
   tidak muat di dialog satu-tembakan.

   Responsif: 4 kolom (desktop) / 2 (tablet) / 1 (mobile). Di mobile modal
   berubah jadi bottom-sheet setinggi layar dengan aksi yang lengket di bawah,
   karena modal tengah-layar memotong isinya begitu keyboard virtual muncul.
   ========================================================================== */

.minitool-section {
    margin-top: 44px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.minitool-head { text-align: center; margin-bottom: 22px; }
.minitool-title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}
.minitool-title i { color: var(--accent); margin-right: 8px; }
.minitool-subtitle { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.minitool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.minitool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 132px;
    padding: 18px;
    text-align: left;
    font: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius, 14px);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.minitool-card:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.minitool-card:disabled { cursor: not-allowed; opacity: 0.55; filter: grayscale(1); }
.minitool-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 1.05rem;
}
.minitool-card-name {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.minitool-card-desc {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-muted);
}
.minitool-card-flag {
    margin-top: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--success-bg);
    color: var(--success);
}
.minitool-card-flag.is-server { background: var(--info-bg); color: var(--info); }
.minitool-card-flag.is-off { background: var(--danger-bg); color: var(--danger); }

/* ---- Modal shell ---- */
.mt-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(2, 6, 23, 0.62);
    padding: 24px;
    overflow-y: auto;
}
.mt-modal.open { display: flex; align-items: flex-start; justify-content: center; }
.mt-modal-box {
    width: 100%;
    max-width: 720px;
    margin: auto;
    background: var(--surface-raised, var(--bg-card));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    /* Persentase, bukan `calc(100vh - 48px)`. `.mt-modal` sudah fixed inset:0
       dengan padding 24px, jadi 100% = tinggi yang benar-benar tersedia.
       `100vh` IKUT menghitung tinggi scrollbar horizontal, sehingga saat
       scrollbar itu muncul kotak modal jadi ~15px lebih tinggi daripada
       ruangnya, lalu `margin: auto` membagi kelebihannya ke atas dan bawah —
       tepi head dan foot terpotong tanpa bisa di-scroll. */
    max-height: 100%;
}
.mt-modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}
.mt-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    background: var(--accent-light);
    color: var(--accent);
}
.mt-modal-title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.mt-modal-sub { margin: 2px 0 0; font-size: 0.76rem; color: var(--text-muted); }
.mt-modal-close {
    margin-left: auto;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
}
.mt-modal-close:hover { color: var(--danger); border-color: var(--danger); }
.mt-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1 1 auto; }
.mt-modal-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface-raised, var(--bg-card));
    border-radius: 0 0 var(--radius-lg, 16px) var(--radius-lg, 16px);
}
.mt-spacer { flex: 1 1 auto; }

/* ---- Dropzone ---- */
.mt-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px 18px;
    text-align: center;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius, 12px);
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.mt-drop:hover, .mt-drop.is-over { border-color: var(--accent); background: var(--accent-light); }
.mt-drop-icon { font-size: 1.6rem; color: var(--accent); }
.mt-drop-text { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.mt-drop-hint { font-size: 0.75rem; }

/* ---- Selected file rows ---- */
.mt-files { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.mt-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
}
.mt-file > i { color: var(--danger); flex: 0 0 auto; }
.mt-file-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mt-file-meta { flex: 0 0 auto; font-size: 0.73rem; color: var(--text-muted); }
.mt-file-act {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.mt-file-act:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.mt-file-act.is-danger:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.mt-file-act:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---- Fields ---- */
.mt-field { margin-top: 16px; }
.mt-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.mt-input {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.87rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
}
.mt-input:focus { outline: none; border-color: var(--border-focus); }
.mt-input:disabled { opacity: 0.5; cursor: not-allowed; }
.mt-help { margin: 6px 0 0; font-size: 0.74rem; color: var(--text-muted); line-height: 1.5; }

.mt-radios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mt-radio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
}
.mt-radio input { margin-top: 3px; accent-color: var(--accent); }
.mt-radio.is-active { border-color: var(--accent); background: var(--accent-light); }
.mt-radio-name { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.mt-radio-desc { display: block; margin-top: 2px; font-size: 0.72rem; color: var(--text-muted); }

.mt-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
}
.mt-check input { margin-top: 3px; accent-color: var(--accent); }
.mt-check.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Privacy / alerts ---- */
.mt-privacy {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding: 12px 14px;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
    background: var(--info-bg);
    border-radius: var(--radius-sm, 8px);
}
.mt-privacy i { color: var(--info); margin-top: 2px; flex: 0 0 auto; }
.mt-alert {
    display: none;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 14px;
    font-size: 0.82rem;
    line-height: 1.5;
    border-radius: var(--radius-sm, 8px);
    background: var(--danger-bg);
    color: var(--danger);
}
.mt-alert.open { display: flex; }
.mt-alert.is-warn { background: var(--warning-bg); color: var(--warning); }

/* ---- Buttons ---- */
.mt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    font: inherit;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.mt-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.mt-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.mt-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.mt-btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.mt-btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.mt-btn-success:hover:not(:disabled) { filter: brightness(1.08); color: #fff; }
.mt-btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.78rem; }

/* ---- Progress + result ---- */
.mt-progress { display: none; margin-top: 18px; }
.mt-progress.open { display: block; }
.mt-progress-track {
    height: 6px;
    border-radius: 999px;
    background: var(--bg-input);
    overflow: hidden;
}
.mt-progress-fill {
    height: 100%;
    width: 35%;
    border-radius: 999px;
    background: var(--accent);
    animation: mtIndeterminate 1.1s ease-in-out infinite;
}
@keyframes mtIndeterminate {
    0% { margin-left: -35%; }
    100% { margin-left: 100%; }
}
.mt-progress-label { margin: 8px 0 0; font-size: 0.78rem; color: var(--text-muted); text-align: center; }

.mt-result {
    display: none;
    margin-top: 18px;
    padding: 16px;
    background: var(--success-bg);
    border-radius: var(--radius, 12px);
}
.mt-result.open { display: block; }
.mt-result-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--success);
}
.mt-result-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.mt-result-stat { text-align: center; }
.mt-result-stat b { display: block; font-size: 1rem; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.mt-result-stat span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.mt-result-arrow { color: var(--text-muted); }
.mt-result-file {
    margin: 12px 0 0;
    font-size: 0.74rem;
    color: var(--text-muted);
    text-align: center;
    word-break: break-all;
}

/* ---- Sign PDF: preview + placement stage ---- */
.mt-preview {
    position: relative;
    margin-top: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
    padding: 12px;
}
.mt-stage { position: relative; margin: 0 auto; line-height: 0; touch-action: none; max-width: 100%; }
.mt-stage canvas { display: block; width: 100%; height: auto; border-radius: 4px; }
.mt-item {
    position: absolute;
    border: 1.5px dashed var(--accent);
    background: rgba(59, 130, 246, 0.06);
    cursor: move;
    touch-action: none;
}
.mt-item img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block; }
.mt-item-resize {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #fff;
    cursor: nwse-resize;
    touch-action: none;
    padding: 0;
}
.mt-item-del {
    position: absolute;
    right: -10px;
    top: -10px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    cursor: pointer;
    padding: 0;
}
.mt-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.mt-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---- Sign PDF: signature pad ---- */
.mt-sigpad-wrap {
    margin-top: 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
}
.mt-sigpad { display: block; width: 100%; height: 190px; touch-action: none; cursor: crosshair; }

/* ---- Responsif ---- */
@media (max-width: 1023px) {
    .minitool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mt-modal-box { max-width: 92vw; }
}
@media (max-width: 767px) {
    .minitool-section { margin-top: 32px; padding-top: 24px; }
    .minitool-grid { grid-template-columns: 1fr; gap: 12px; }
    .minitool-card { min-height: 0; flex-direction: row; align-items: center; }
    .minitool-card-body { flex: 1 1 auto; min-width: 0; }
    .minitool-card-flag { margin-top: 0; }

    /* Bottom-sheet: modal tengah-layar terpotong begitu keyboard virtual naik. */
    .mt-modal { padding: 0; }
    .mt-modal.open { align-items: stretch; }
    .mt-modal-box {
        max-width: none;
        max-height: 100%;
        height: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;
    }
    .mt-modal-head, .mt-modal-body, .mt-modal-foot { padding-left: 16px; padding-right: 16px; }
    .mt-modal-foot {
        position: sticky;
        bottom: 0;
        border-radius: 0;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
    .mt-modal-foot .mt-btn { flex: 1 1 auto; }
    .mt-radios { grid-template-columns: 1fr; }
    .mt-result-stats { gap: 10px; }
    .mt-sigpad { height: 150px; }
}

/* Kartu mini-tools mengikuti pengangkatan tema terang yang sama dengan
   .module-card (tema light/grey memakai bayangan, bukan garis tebal). */
[data-theme="light"] .minitool-card,
[data-theme="grey"] .minitool-card { box-shadow: var(--shadow-xs); }
[data-theme="light"] .minitool-card:hover:not(:disabled),
[data-theme="grey"] .minitool-card:hover:not(:disabled) { box-shadow: var(--shadow-md); }
[data-theme="light"] .mt-modal-box,
[data-theme="grey"] .mt-modal-box { box-shadow: var(--shadow-lg); }

/* Kontrol yang terkunci selama proses berjalan. Dropzone bukan <button>,
   jadi `disabled` tidak berlaku — pointer-events yang mematikannya. */
.mt-drop.is-busy { pointer-events: none; opacity: 0.55; }
.mt-btn.is-busy, .mt-file-act.is-busy { pointer-events: none; }

/* ==========================================================================
   AGENTTUKU — floating assistant (Fase 27-B)

   Rendered by partials/agenttuku-widget.blade.php, included by four layouts
   immediately before partials/antivirus-alert. That placement is load-bearing:
   see the sibling-combinator offset below.
   ========================================================================== */

#agenttuku-root {
    --at-right: 24px;
    --at-bottom: 24px;
    opacity: 0;
    transition: opacity .18s ease;
}
#agenttuku-root.at-ready { opacity: 1; }

/* Live-chat collision.

   On layouts.public and layouts.user the live-chat widget also claims the
   bottom-right corner. Because AgentTuku is included AFTER it, and both are
   direct children of body, a sibling combinator can shift AgentTuku out of
   the way — derived from the DOM that actually rendered rather than from a
   compile-time guess. That matters in three real cases a Blade include-param
   would get wrong: /beranda (AgentTuku present, live chat suppressed by the
   layout unless-guard), livechat_enabled = 0 (the widget emits nothing at
   all), and any future reordering of the includes. Zero JS, correct on the
   first paint. */
#lc-widget-wrap ~ #agenttuku-root { --at-right: 100px; }

.at-launcher {
    position: fixed;
    right: var(--at-right);
    bottom: var(--at-bottom);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--at-accent, #2563EB);
    color: #fff;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(2, 6, 23, .28), 0 2px 6px rgba(2, 6, 23, .18);
    /* Above live chat (99990), below the antivirus alert (99999) — that one
       reports a blocked malicious upload and must always win. */
    z-index: 99991;
    touch-action: none;
    transition: transform .16s ease, box-shadow .16s ease;
}
.at-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(2, 6, 23, .34); }
.at-launcher:active { cursor: grabbing; }
.at-launcher:focus-visible { outline: 3px solid var(--at-accent, #2563EB); outline-offset: 3px; }
#agenttuku-root.at-dragging .at-launcher { transition: none; cursor: grabbing; }
#agenttuku-root.at-open .at-launcher { transform: scale(.92); }
.at-launcher-icon { display: flex; }

.at-panel {
    position: fixed;
    right: var(--at-right);
    bottom: calc(var(--at-bottom) + 68px);
    width: 380px;
    max-width: calc(100vw - 32px);
    /* dvh, never vh — 100vh includes the horizontal-scrollbar height, which
       silently clips the head and foot with no way to scroll (Fase 23b). */
    height: min(560px, calc(100dvh - 120px));
    display: flex;
    flex-direction: column;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, .26);
    overflow: hidden;
    z-index: 99992;
}
.at-panel[hidden] { display: none; }

.at-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 14px 12px;
    background: var(--at-accent, #2563EB);
    color: #fff;
    flex-shrink: 0;
}
.at-head-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.at-avatar {
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.at-title { font-size: 14px; font-weight: 700; line-height: 1.2; }
.at-sub { font-size: 11px; opacity: .82; margin-top: 2px; }
.at-head-actions { display: flex; gap: 4px; flex-shrink: 0; }
.at-icon-btn {
    width: 30px; height: 30px;
    border: none; border-radius: 8px;
    background: rgba(255, 255, 255, .14);
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.at-icon-btn:hover { background: rgba(255, 255, 255, .28); }
.at-icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.at-log {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-body, #f8fafc);
}
.at-msg { display: flex; }
.at-msg-user { justify-content: flex-end; }
.at-bubble {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.6;
    /* pre-wrap because model output is inserted with textContent — no markdown
       renderer, so newlines are the only formatting that survives, by design. */
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.at-msg-bot .at-bubble {
    background: var(--bg-card, #fff);
    color: var(--text-primary, #0f172a);
    border: 1px solid var(--border, #e2e8f0);
    border-bottom-left-radius: 5px;
}
.at-msg-user .at-bubble {
    background: var(--at-accent, #2563EB);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.at-typing { display: flex; gap: 4px; align-items: center; padding: 13px; }
.at-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--text-muted, #64748b);
    animation: at-blink 1.2s infinite ease-in-out;
}
.at-typing span:nth-child(2) { animation-delay: .18s; }
.at-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes at-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.at-suggests {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 0 14px 10px;
    flex-shrink: 0;
    background: var(--bg-body, #f8fafc);
}
.at-chip {
    padding: 6px 11px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 999px;
    background: var(--bg-card, #fff);
    color: var(--text-secondary, #475569);
    font-size: 11.5px;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.at-chip:hover { border-color: var(--at-accent, #2563EB); color: var(--at-accent, #2563EB); }

.at-composer {
    display: flex; align-items: flex-end; gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border, #e2e8f0);
    background: var(--bg-card, #fff);
    flex-shrink: 0;
}
.at-input {
    flex: 1;
    resize: none;
    max-height: 120px;
    padding: 9px 12px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    background: var(--bg-body, #f8fafc);
    color: var(--text-primary, #0f172a);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
}
.at-input:focus { outline: none; border-color: var(--at-accent, #2563EB); }
.at-input:disabled { opacity: .6; }
.at-send {
    width: 38px; height: 38px;
    border: none; border-radius: 10px;
    background: var(--at-accent, #2563EB);
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s ease;
}
.at-send:disabled { opacity: .5; cursor: default; }
.at-send:focus-visible { outline: 2px solid var(--at-accent, #2563EB); outline-offset: 2px; }

.at-foot {
    margin: 0;
    padding: 0 14px 10px;
    font-size: 10.5px;
    color: var(--text-muted, #64748b);
    text-align: center;
    background: var(--bg-card, #fff);
    flex-shrink: 0;
}
.at-sr {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Tablet — slightly narrower panel, launcher unchanged. */
@media (max-width: 900px) {
    .at-panel { width: 340px; }
}

/* Mobile — full-width bottom sheet. A floating 380px panel is clipped on a
   375px viewport; same conclusion as the Fase 24 notification bell. Two 56px
   bubbles side by side would also eat a quarter of the width, so the live-chat
   offset stacks vertically here instead of horizontally. */
@media (max-width: 640px) {
    #lc-widget-wrap ~ #agenttuku-root { --at-right: 24px; --at-bottom: 96px; }
    .at-panel {
        right: 0 !important;
        left: 0;
        bottom: 0 !important;
        width: auto;
        max-width: none;
        height: min(85dvh, 640px);
        border-radius: 16px 16px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    .at-bubble { max-width: 90%; }
}

/* Reduced motion only disables transitions here. Safe, unlike Fase 10 A4 and
   Fase 14 A2b — this widget has no animation loop that could freeze, only the
   typing dots, which stop being decorative if they stop moving. */
@media (prefers-reduced-motion: reduce) {
    #agenttuku-root, .at-launcher, .at-icon-btn, .at-chip, .at-send { transition: none; }
    .at-launcher:hover { transform: none; }
}
