@font-face {
  font-family: 'Nasalization';
  src: url('fonts/nasalization.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   TAP Helpdesk — Design System
   Professional, elegant, modern & simple.
   ========================================================================== */
:root {
  --bg: #f2f6f8;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --border: #e3ebf0;
  --line: #eef3f6;
  --text: #13242c;
  --muted: #60737e;
  --primary: #0e7f98;
  --primary-dk: #0a5f72;
  --primary-lt: #e6f3f6;
  --gradient: linear-gradient(135deg, #11a0b8 0%, #0b6a80 100%);
  --danger: #d94f4c;
  --ok: #0f9d6a;
  --ok-lt: #e5f5ee;
  --info: #2f7fc0;
  --info-lt: #e7f1fa;
  --warn: #ad7a1e;
  --warn-lt: #faefda;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --sh-sm: 0 1px 2px rgba(18, 45, 55, 0.05), 0 2px 10px rgba(18, 45, 55, 0.04);
  --sh-md: 0 12px 32px rgba(18, 58, 72, 0.09);
  --sh-lg: 0 26px 60px rgba(18, 58, 72, 0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  overscroll-behavior-y: none;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  padding-bottom: calc(176px + env(safe-area-inset-bottom));
}

/* ===== Header ===== */
#app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo-txt {
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  user-select: none;
}
.brand-help {
  font-family: 'Nasalization', 'Inter', 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-desk {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text);
}
.brand-text { min-width: 0; }
.brand-text h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.1px;
  color: var(--text);
  white-space: nowrap;
}
.brand-text p {
  margin: 1px 0 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ===== Views ===== */
#main { max-width: 560px; margin: 0 auto; padding: 22px 18px 12px; }

.view { display: none; animation: fadeUp 0.28s ease both; }
.view.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Hero ===== */
.hero { margin: 4px 0 24px; }
.hero-text { max-width: 540px; }
.hero h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.2px;
  line-height: 1.3;
  color: var(--text);
}
.hero p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}
.hero-badge { display: none; }

#view-create { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }

/* ===== Form ===== */
.field { margin-bottom: 18px; }
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.field label em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  font-size: 11.5px;
}
.field label b { color: var(--danger); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap svg {
  position: absolute;
  left: 15px;
  width: 18px; height: 18px;
  fill: #9db3bc;
  pointer-events: none;
  transition: fill 0.2s;
}
.input-wrap:focus-within svg { fill: var(--primary); }

input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid #e1e9ee;
  border-radius: 13px;
  padding: 13px 15px 13px 44px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
textarea {
  padding: 13px 15px;
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}
input::placeholder, textarea::placeholder { color: #9db1bb; }
input:hover, textarea:hover { border-color: #cfdce3; }
input:focus, textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(14, 127, 152, 0.12);
}

/* ===== Chips kategori ===== */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid #d8e4e9;
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dk); }
.chip.selected {
  color: #ffffff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 5px 14px rgba(11, 106, 128, 0.28);
}

/* ===== Lampiran foto ===== */
.photo-picker {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dk);
  background: var(--primary-lt);
  border: 1.5px dashed #a8d3dd;
  border-radius: 13px;
  padding: 15px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.photo-picker:hover { background: #d8eef3; border-color: var(--primary); }
.photo-picker svg { width: 20px; height: 20px; fill: currentColor; }
.photo-previews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  animation: fadeUp 0.2s ease both;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-item .rm {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(16, 43, 53, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-row .photo-picker { padding: 14px 10px; font-size: 13.5px; }
.photo-note { margin-top: 8px; font-size: 12px; color: var(--muted); font-style: normal; text-align: right; }

/* ===== Buttons ===== */
.btn-primary {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  background: var(--gradient);
  border: none;
  border-radius: 13px;
  padding: 15px 20px;
  margin-top: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 10px 24px rgba(11, 106, 128, 0.26);
  transition: transform 0.16s, box-shadow 0.18s, filter 0.18s;
}
.btn-primary:hover { filter: brightness(1.03); box-shadow: 0 14px 30px rgba(11, 106, 128, 0.32); }
.btn-primary:active { transform: translateY(1px); box-shadow: 0 6px 14px rgba(11, 106, 128, 0.2); }
.btn-primary:disabled { opacity: 0.6; cursor: default; box-shadow: none; transform: none; filter: none; }

#submit-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(70px + env(safe-area-inset-bottom));
  z-index: 55;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
}
#submit-dock .btn-primary { margin-top: 0; max-width: 560px; margin-left: auto; margin-right: auto; }
body.dock-hidden #submit-dock { display: none; }

.btn-loader {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-primary.loading .btn-loader { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-ghost {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary-dk);
  background: var(--primary-lt);
  border: 1px solid #cfe5ea;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: #d8eef3; }

/* ===== Success card ===== */
.success-card {
  margin-top: 8px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  padding: 32px 24px;
  animation: fadeUp 0.3s ease both;
}
.success-icon {
  width: 62px; height: 62px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--ok-lt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.success-icon svg { width: 32px; height: 32px; fill: var(--ok); }
.success-card h3 { margin: 4px 0 8px; font-size: 19px; letter-spacing: -0.2px; color: var(--text); }
.success-card p { margin: 0 0 18px; font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.ticket-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-lt);
  border: 1px dashed #a8d3dd;
  border-radius: 12px;
  padding: 11px 15px;
  margin-bottom: 18px;
}
.ticket-no strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--primary-dk);
}
.ticket-no button {
  display: flex;
  padding: 6px;
  border: none;
  border-radius: 8px;
  background: rgba(14, 127, 152, 0.15);
  color: var(--primary-dk);
  cursor: pointer;
}
.ticket-no button svg { width: 15px; height: 15px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ===== Status card ===== */
.status-card {
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  padding: 24px;
  animation: fadeUp 0.3s ease both;
}
.status-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.status-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  letter-spacing: 0.4px;
}
.status-chip.st-open     { color: var(--warn); background: var(--warn-lt); }
.status-chip.st-progress { color: var(--info); background: var(--info-lt); }
.status-chip.st-resolved { color: var(--ok);   background: var(--ok-lt); }
.status-chip.st-closed   { color: #5b7079;     background: #e9eef1; }

.status-no { font-size: 15px; font-weight: 800; letter-spacing: 0.4px; }

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e8eff3;
  overflow: hidden;
  margin: 16px 0 7px;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient);
  transition: width 0.6s ease;
}
.progress-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: right; }

.status-body { margin-top: 16px; border-top: 1px solid var(--line); }
.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.status-row:last-child { border-bottom: none; }
.status-row .k { color: var(--muted); }
.status-row .v { text-align: right; font-weight: 600; color: var(--text); }

.admin-reply {
  margin-top: 16px;
  padding: 15px 17px;
  background: var(--primary-lt);
  border-left: 3px solid var(--primary);
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.65;
}
.admin-reply .h { font-weight: 700; color: var(--primary-dk); font-size: 11.5px; letter-spacing: 0.5px; margin-bottom: 6px; }

.status-empty {
  margin-top: 8px;
  text-align: center;
  padding: 34px 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  background: var(--surface);
  border: 1.5px dashed #cfdde3;
  border-radius: var(--r-lg);
}

/* ===== Riwayat laporan ===== */
.history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 0 12px; }
.history-head h3 { margin: 0; font-size: 15px; font-weight: 800; color: var(--text); }
.refresh-btn { font-family: inherit; font-size: 12px; font-weight: 700; color: var(--primary-dk); background: var(--primary-lt); border: none; border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.refresh-btn:active { background: #d8eef3; }
.history-list { display: flex; flex-direction: column; gap: 10px; }
.hist-item {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  text-align: left;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 15px;
  cursor: pointer;
  box-shadow: var(--sh-sm);
  transition: box-shadow 0.16s, transform 0.16s, border-color 0.16s;
}
.hist-item:hover { border-color: #cfdce3; box-shadow: var(--sh-md); transform: translateY(-1px); }
.hist-item:active { background: var(--primary-lt); transform: none; }
.hist-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; }
.hist-dot.st-open { background: var(--warn); } .hist-dot.st-progress { background: var(--info); } .hist-dot.st-resolved { background: var(--ok); } .hist-dot.st-closed { background: #8aa0aa; }
.hist-main { min-width: 0; flex: 1; }
.hist-no { font-size: 13px; font-weight: 800; letter-spacing: 0.3px; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hist-chip { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: 0.2px; }
.hist-chip.st-open { color: var(--warn); background: var(--warn-lt); } .hist-chip.st-progress { color: var(--info); background: var(--info-lt); } .hist-chip.st-resolved { color: var(--ok); background: var(--ok-lt); } .hist-chip.st-closed { color: #5b7079; background: #e9eef1; }
.hist-subject { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 4px 0 2px; word-break: break-word; }
.hist-meta { font-size: 11.5px; color: var(--muted); }
.hist-arrow { width: 18px; height: 18px; fill: #9db4be; flex: none; margin-top: 3px; }

/* ===== Panduan ===== */
.guide-list { display: flex; flex-direction: column; gap: 12px; }
.guide-item {
  display: flex;
  gap: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 17px;
}
.guide-num {
  flex: 0 0 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #ffffff;
  background: var(--gradient);
  box-shadow: 0 6px 14px rgba(11, 106, 128, 0.26);
}
.guide-item h4 { margin: 1px 0 4px; font-size: 15px; color: var(--text); }
.guide-item p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

.contact-card {
  margin-top: 14px;
  display: flex;
  gap: 15px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  padding: 17px;
}
.contact-icon {
  flex: 0 0 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-lt);
}
.contact-icon svg { width: 23px; height: 23px; fill: var(--primary); }
.contact-card h4 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.contact-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ===== Bottom nav ===== */
#bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  color: #7d94a0;
  background: none;
  border: none;
  border-radius: 13px;
  padding: 8px 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-btn svg { width: 22px; height: 22px; fill: currentColor; opacity: 0.85; }
.nav-btn.active {
  color: var(--primary-dk);
  background: var(--primary-lt);
}

/* ===== Toast & offline ===== */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(16px);
  z-index: 80;
  max-width: 86%;
  background: #14323d;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 12px;
  padding: 12px 20px;
  box-shadow: 0 14px 32px rgba(20, 50, 63, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: #8a3532; }

#offline-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #7a4d0a;
  background: #fdf0d6;
  border-bottom: 1px solid #f0dcab;
  padding: 9px 14px calc(9px + env(safe-area-inset-top) * 0.6);
}

/* ===== Desktop / laptop (browser) ===== */
#top-nav { display: none; }
.dsk { display: none; }
#t-cat-select { display: none; }
.hero-badge { display: none; }
#desk-footer { display: none; }

@media (min-width: 1000px) {
  body {
    padding-bottom: 0;
    background: linear-gradient(165deg, #eef5f8 0%, #e6f0f5 45%, #ddeaf0 100%);
    min-height: 100vh;
  }

  #app-header {
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.84);
    border-bottom: 1px solid rgba(14, 127, 152, 0.08);
    box-shadow: 0 1px 0 rgba(20, 58, 72, 0.04);
  }
  .header-inner {
    max-width: 1080px;
    margin: 0 auto;
  }
  #top-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
    background: #edf3f6;
    border: 1px solid #e1eaf0;
    border-radius: 999px;
    padding: 5px;
  }
  #top-nav .nav-btn {
    flex: 0 0 auto;
    flex-direction: row;
    font-size: 13.5px;
    font-weight: 700;
    color: #5b7a86;
    padding: 10px 22px;
    border-radius: 999px;
    background: transparent;
    transition: color 0.18s, background-color 0.18s, box-shadow 0.18s;
  }
  #top-nav .nav-btn:hover { color: var(--primary-dk); }
  #top-nav .nav-btn.active {
    color: #ffffff;
    background: var(--gradient);
    box-shadow: 0 6px 16px rgba(11, 106, 128, 0.3);
  }

  #main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 38px 30px 70px;
  }
  .view { padding: 0; }
  #view-create { padding-bottom: 0; }

  .hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 28px;
  }
  .hero h2 {
    font-size: 26px;
    margin: 0 0 8px;
    letter-spacing: -0.4px;
    position: relative;
    padding-left: 18px;
  }
  .hero h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 5px;
    border-radius: 4px;
    background: var(--gradient);
  }
  .hero p { margin: 0; }
  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
    color: #1f7285;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid #d5e6ec;
    border-radius: 999px;
    padding: 9px 17px;
    white-space: nowrap;
  }
  .hero-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(15, 157, 106, 0.18);
  }

  #view-create,
  #view-status,
  #view-guide {
    background: #ffffff;
    border: 1px solid #e3ecf1;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    padding: 40px 42px 46px;
  }
  #view-login { padding: 6px 0; }
  #view-login .login-wrap {
    max-width: 460px;
    margin: 24px auto 0;
    padding: 38px;
    border: 1px solid #e3ecf1;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    background: #fff;
  }

  #bottom-nav { display: none; }
  #submit-dock { display: none; }
  .dsk { display: block; }

  #ticket-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    align-items: start;
  }
  #ticket-form > .auto-note,
  #ticket-form .field-full { grid-column: 1 / -1; }
  #ticket-form .field { margin-bottom: 22px; }
  #ticket-form .field label { font-size: 13.5px; margin-bottom: 10px; }
  #ticket-form input,
  #ticket-form textarea {
    padding: 14px 16px 14px 45px;
    font-size: 14.5px;
    border-radius: 13px;
    background: var(--surface-soft);
  }
  #ticket-form textarea { padding-left: 16px; min-height: 140px; }
  #ticket-form input:focus,
  #ticket-form textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 127, 152, 0.12);
  }
  .input-wrap svg { left: 16px; }

  #t-cat-select {
    display: block;
    width: 100%;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--text);
    background: var(--surface-soft) url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23809aa6' viewBox='0 0 24 24'%3E%3Cpath d='M7 9.5l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 16px center;
    border: 1.5px solid #e1e9ee;
    border-radius: 13px;
    padding: 14px 42px 14px 16px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  }
  #t-cat-select:hover { border-color: #c3dae2; }
  #t-cat-select:focus {
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(14, 127, 152, 0.12);
  }
  #ticket-form #category-chips { display: none; }

  .auto-note { border-radius: 13px; }

  .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    padding-top: 24px;
    border-top: 1px solid #eef3f5;
  }
  #btn-submit-ds.btn-primary {
    width: auto;
    min-width: 240px;
    margin-top: 0;
    padding: 16px 30px;
    border-radius: 13px;
  }
  #btn-submit-ds.btn-primary:hover { transform: translateY(-2px); }
  #btn-submit-ds.btn-primary:active { transform: translateY(0); }
  #btn-submit-ds.btn-primary.wide { max-width: none; }

  #status-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 28px;
    row-gap: 4px;
    align-items: end;
  }
  #status-form .btn-primary {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 220px;
    border-radius: 13px;
  }

  .guide-list { gap: 14px; }
  .guide-item {
    border: 1px solid #edf2f5;
    border-radius: 18px;
    padding: 19px;
  }
  .contact-card { border-radius: 18px; }

  .status-card { border-radius: 18px; box-shadow: var(--sh-sm); border: 1px solid #e3ecf1; }

  #toast { bottom: 28px; box-shadow: 0 14px 30px rgba(18, 48, 60, 0.3); }

  .chips { flex-wrap: wrap; overflow-x: visible; }

  .auth-name { font-size: 13px; }
  .auth-btn { font-size: 13px; padding: 9px 17px; }

  footer#desk-footer {
    display: block;
    margin-top: 32px;
    text-align: center;
    font-size: 12px;
    color: #7f97a2;
    letter-spacing: 0.3px;
  }
}

/* ===== Autentikasi: header ===== */
#auth-area { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-dk);
  background: var(--primary-lt);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.15s, color 0.15s;
}
.auth-btn:hover { background: #d8eef3; }
.auth-btn.icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
}
.auth-btn.icon:hover { background: var(--primary-lt); color: var(--primary-dk); }
.auth-btn.icon svg { width: 15px; height: 15px; fill: currentColor; }
.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 150px;
}
.auth-avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(11, 106, 128, 0.22);
}
.auth-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== Gate login (sebelum kirim laporan) ===== */
.login-gate {
  text-align: center;
  padding: 38px 22px;
  margin: 8px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.login-gate-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--primary-lt);
}
.login-gate-icon svg { width: 29px; height: 29px; fill: var(--primary-dk); }
.login-gate h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: var(--text); }
.login-gate p { margin: 0 0 22px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.login-gate .btn-primary { width: 100%; max-width: 260px; margin-left: auto; margin-right: auto; }

/* ===== Persetujuan data (terisi otomatis) ===== */
.auto-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-dk);
  background: var(--primary-lt);
  border: 1px solid #d3eaf0;
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 18px;
}
.auto-note::before {
  content: "✓";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--primary);
  border-radius: 50%;
}
input[readonly] {
  background: var(--surface);
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  font-weight: 700;
}

/* ===== Halaman login ===== */
#view-login { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
.login-wrap {
  max-width: 400px;
  margin: 8px auto 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--sh-md);
}
.login-head { text-align: center; margin-bottom: 22px; }
.login-logo { margin-bottom: 14px; }
.login-logo img { height: 46px; width: auto; }
.login-head h2 { margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -0.2px; color: var(--text); }
.login-head p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.login-hint {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}