:root {
  --blue-light: #4C8EFF;
  --blue-mid: #1F62F2;
  --blue-deep: #0E4BE0;
  --blue-glow: rgba(24, 92, 240, 0.36);

  --bg-page: linear-gradient(135deg, #DFF2FA 0%, #DAE8FF 50%, #E5DDFA 100%);
  --surface: #FFFFFF;
  --surface-soft: #F4F5F8;
  --surface-tint: #F7F9FC;
  --divider: #EEF1F6;
  --border: #E5EAF2;

  --text: #111827;
  --text-secondary: #4B5563;
  --text-muted: #8B95A5;

  --shadow-shell: 0 24px 64px rgba(17, 38, 102, 0.13), 0 4px 16px rgba(17, 38, 102, 0.06);
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.04);
  --shadow-modal: 0 24px 56px rgba(15, 23, 42, 0.22);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-page);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* OUTER STAGE & SHELL */
.app-stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 16px 32px;
}

.app-shell {
  width: 100%;
  max-width: 960px;
  min-height: calc(100vh - 56px);
  background: var(--surface);
  border-radius: 26px;
  box-shadow: var(--shadow-shell);
  overflow: clip;
  display: flex;
  flex-direction: column;
  position: relative;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 72px;
}

/* ============================================================================
   HERO BLUE HEADER (MY TICKETS)
============================================================================ */
.hero-header {
  background: linear-gradient(180deg, #4B8BFF 0%, #2166F5 58%, #0E4EE2 100%);
  color: #FFFFFF;
  padding: 20px 24px 22px;
  position: relative;
  z-index: 5;
  box-shadow: 0 12px 28px -8px rgba(24, 92, 240, 0.32);
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-left, .hero-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-title-group {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-title {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #FFFFFF;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  backdrop-filter: blur(6px);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px #4ADE80;
  animation: pulseDot 2s infinite;
}

.live-chip.offline .live-dot {
  background: #CBD5E1;
  box-shadow: none;
  animation: none;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.icon-btn-glass {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background 0.15s;
}
.icon-btn-glass:hover {
  background: rgba(255, 255, 255, 0.24);
}

.filter-active-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FDE047;
  border: 1.5px solid #1F62F2;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.hero-pill-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.user-chip-hero {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-size: 0.77rem;
  font-weight: 700;
}

.user-chip-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--blue-deep);
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Frosted Search Bar */
.hero-search-wrap {
  position: relative;
}

.hero-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}

.hero-search-input {
  width: 100%;
  padding: 11px 38px 11px 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}

.hero-search-input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search-input:focus {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.42);
}

.hero-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 2px 6px;
}

/* Quick Slide Menu */
.quick-menu {
  background: #F4F8FF;
  border-bottom: 1px solid #DCE8FF;
  padding: 10px 24px;
}

.quick-menu-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qm-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1px solid #DBE6FC;
  background: #FFFFFF;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.qm-item:hover {
  border-color: var(--blue-light);
  color: var(--blue-deep);
}

/* ============================================================================
   BODY WITH SOFT BLUE-MIST TOP WASH
============================================================================ */
.screen-body {
  flex: 1;
  background: linear-gradient(180deg, rgba(66, 133, 244, 0.11) 0%, rgba(255, 255, 255, 0) 64px), #FFFFFF;
  padding: 18px 24px 86px;
}

/* Compact Status Pill Strip */
.status-pill-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.status-pill-strip::-webkit-scrollbar { display: none; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}

.status-chip:hover {
  border-color: #BFDBFE;
  color: var(--blue-deep);
}

.status-chip.active {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: var(--blue-deep);
}

.status-chip.chip-retest.active {
  background: #F5F3FF;
  border-color: #C4B5FD;
  color: #6D28D9;
}

.status-chip.chip-failed {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #BE123C;
}

.status-chip.chip-failed.active {
  background: #E11D48;
  border-color: #E11D48;
  color: #FFFFFF;
}

.chip-count {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
}

.status-chip.active .chip-count {
  background: rgba(31, 98, 242, 0.14);
}
.status-chip.chip-failed.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Filter Drawer */
.filter-drawer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--surface-tint);
  border-radius: 14px;
  border: 1px solid var(--divider);
}

.soft-select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.soft-select:focus {
  border-color: var(--blue-mid);
}

/* Feed Section Header */
.feed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.feed-section-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.2px;
}

.feed-header-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.view-pills {
  display: inline-flex;
  background: var(--surface-soft);
  border-radius: 9px;
  padding: 3px;
}

.view-pill {
  border: none;
  background: transparent;
  padding: 4px 11px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}
.view-pill.active {
  background: #FFFFFF;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.btn-soft-sm {
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-soft-sm:hover:not(:disabled) {
  background: var(--surface-soft);
  color: var(--text);
}
.btn-soft-sm:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================================
   TICKET FEED ITEMS (CLEAN APPLE/REFERENCE STYLE)
============================================================================ */
.ticket-feed {
  display: flex;
  flex-direction: column;
}

.ticket-item {
  padding: 15px 4px 16px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  transition: background 0.14s, padding 0.14s, border-radius 0.14s;
}

.ticket-item:hover {
  background: #F8FAFF;
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -8px;
  margin-right: -8px;
  border-radius: 14px;
  border-bottom-color: transparent;
}

.ticket-item:last-child {
  border-bottom: none;
}

.ticket-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

/* Soft Pastel Pills (exact look from reference screenshots) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.status-open { background: #E6F8EB; color: #1A9E47; }
.status-investigating { background: #E8EEFF; color: #3B5BDB; }
.status-ongoing_fix { background: #E3F2FD; color: #1976D2; }
.status-ready_for_retest { background: #F1E8FF; color: #7C3AED; }
.status-resolved { background: #D1FAE5; color: #047857; }
.status-closed { background: #F1F5F9; color: #64748B; }

.sev-critical { background: #FFE4E6; color: #E11D48; }
.sev-high { background: #F3E8FF; color: #8B35EA; }
.sev-medium { background: #FFEDD5; color: #EA6A12; }
.sev-low { background: #F1F5F9; color: #64748B; }

.pill-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.69rem;
  background: #F4F5F8;
  color: #475569;
}

.pill-app {
  background: #EEF4FF;
  color: #1D4ED8;
}

.pill-retest-fail {
  background: #E11D48;
  color: #FFFFFF;
}

.pill-retest-wait {
  background: #7C3AED;
  color: #FFFFFF;
}

.pill-retest-pass {
  background: #DCFCE7;
  color: #15803D;
}

.ticket-person-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 11px;
}

.reporter-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.ticket-person-content {
  flex: 1;
  min-width: 0;
}

.ticket-person-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ticket-reporter-name {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.ticket-time {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.ticket-subject {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ticket-fix-line {
  margin-top: 6px;
  font-size: 0.76rem;
  color: #166534;
  background: #F0FDF4;
  padding: 5px 9px;
  border-radius: 8px;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Soft Bottom Meta Strip (exact match to "Assigned to ... 💬 12 📎 7") */
.ticket-footer-strip {
  background: #F6F8FB;
  border-radius: 10px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.assigned-block {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.mini-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  color: #FFFFFF;
  font-size: 0.62rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-avatar.unassigned {
  background: #CBD5E1;
  color: #475569;
}

.assigned-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assigned-text strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.counters-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  font-weight: 600;
  color: #6B7280;
}

.counter-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================================
   FLOATING GLOSSY GLOW BLUE BUTTON (EXACT REFERENCE CTA)
============================================================================ */
.floating-cta-wrap {
  position: sticky;
  bottom: 74px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  padding: 10px 16px 4px;
  z-index: 12;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.92) 55%, rgba(255,255,255,1) 100%);
}

.btn-glow-blue {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #3C82FA 0%, #1757EA 52%, #0D47D8 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 84, 232, 0.36), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-glow-blue:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(20, 84, 232, 0.44), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.btn-glow-blue:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-glow-full {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.95rem;
}

.btn-glow-sm {
  padding: 9px 18px;
  font-size: 0.82rem;
  border-radius: 11px;
}

.btn-glow-xs {
  padding: 8px 14px;
  font-size: 0.78rem;
  border-radius: 10px;
}

.btn-circle-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
   BOTTOM TAB BAR (MATCHING REFERENCE 2-TAB DESIGN)
============================================================================ */
.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #FFFFFF;
  border-top: 1px solid var(--divider);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.bottom-tab {
  position: relative;
  border: none;
  background: transparent;
  padding: 15px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  color: #6B7280;
  cursor: pointer;
  transition: color 0.15s;
}

.bottom-tab:hover {
  color: var(--blue-mid);
}

.bottom-tab.active {
  color: var(--blue-mid);
}

.bottom-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 2.5px;
  border-radius: 0 0 4px 4px;
  background: var(--blue-mid);
}

/* ============================================================================
   VIEW 2: HELP CENTER (MATCHING IMAGE 1 & 2)
============================================================================ */
.help-header {
  background: linear-gradient(180deg, #DDE9FF 0%, #EEF4FF 65%, #FFFFFF 100%);
  padding: 22px 24px 16px;
}

.help-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.help-header h1 {
  margin: 0;
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.icon-btn-dark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: rgba(15, 23, 42, 0.05);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn-dark:hover { background: rgba(15, 23, 42, 0.1); }

.help-search-wrap {
  position: relative;
}

.help-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.help-search-input {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border: none;
  border-radius: 12px;
  background: #F1F3F6;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--text);
  outline: none;
}

.help-search-input:focus {
  background: #FFFFFF;
  box-shadow: 0 0 0 2px #BFDBFE;
}

.help-body {
  padding-top: 12px;
}

.help-section-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}

.articles-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-card {
  background: #FFFFFF;
  border: 1px solid var(--divider);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.article-toggle {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.article-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #EEF4FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.article-head-text {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.article-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.article-chevron {
  color: var(--text-muted);
  transition: transform 0.18s;
  flex-shrink: 0;
}

.article-card.open .article-chevron {
  transform: rotate(90deg);
}

.article-content {
  padding: 0 16px 15px 66px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.article-content p { margin: 0 0 6px; }
.article-content ul { margin: 0; padding-left: 18px; }
.article-content li { margin-bottom: 4px; }

.need-help-banner {
  margin-top: 20px;
  background: linear-gradient(135deg, #F0F6FF 0%, #E3EEFF 100%);
  border: 1px solid #D4E4FF;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.need-help-text h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #143A85;
}

.need-help-text p {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: #4B6088;
  max-width: 420px;
}

.support-badge-art {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: linear-gradient(145deg, #4B8BFF, #1654E8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(22, 84, 232, 0.28);
  flex-shrink: 0;
}

.empty-mini {
  padding: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface-tint);
  border-radius: 12px;
}

/* ============================================================================
   VIEW 3: NEW TICKET SCREEN (MATCHING IMAGE 3 — CLEAN, NO URGENT TOGGLE)
============================================================================ */
.new-ticket-header {
  background: linear-gradient(180deg, #D9E6FF 0%, #EFF4FF 65%, #FFFFFF 100%);
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  padding: 4px 6px 4px 0;
}

.new-ticket-form {
  padding: 8px 24px 28px;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

.clean-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.clean-field {
  margin-bottom: 16px;
}

.clean-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
}

.opt-label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.78rem;
}

.clean-field input[type="text"],
.clean-field input[type="email"],
.clean-field input[type="password"],
.clean-field select,
.clean-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: #F4F5F7;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.clean-field input::placeholder,
.clean-field textarea::placeholder {
  color: #9CA3AF;
}

.clean-field input:focus,
.clean-field select:focus,
.clean-field textarea:focus {
  background: #FFFFFF;
  border-color: #93C5FD;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.clean-field textarea {
  resize: vertical;
  min-height: 108px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
}

.select-caret {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

.mono-input {
  font-family: 'JetBrains Mono', ui-monospace, monospace !important;
  font-size: 0.82rem !important;
}

/* Clean Upload Dropzone (matching Image 3!) */
.clean-dropzone {
  border: 1.5px dashed #D6DCE6;
  border-radius: 14px;
  background: #F8F9FB;
  padding: 22px 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.clean-dropzone:hover, .clean-dropzone.dragover {
  border-color: var(--blue-light);
  background: #F0F6FF;
}

.clean-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.dz-plus-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px dashed #6B7280;
  color: #4B5563;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
}

.dz-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.dz-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.preview-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.preview-strip:empty { display: none; }

.preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #FFFFFF;
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.78);
  color: #FFFFFF;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submit-wrap {
  margin-top: 22px;
}

/* ============================================================================
   BOARD VIEW & PAGINATION
============================================================================ */
.board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  align-items: start;
}

.board-col {
  background: #F4F7FC;
  border-radius: 14px;
  padding: 10px;
  min-height: 360px;
  border: 1px solid var(--divider);
}

.board-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.board-col-count {
  background: #FFFFFF;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.7rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.board-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.board-card {
  background: #FFFFFF;
  border-radius: 11px;
  padding: 11px;
  border: 1px solid var(--divider);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s, box-shadow 0.14s;
}
.board-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.board-card-title {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  margin: 6px 0;
}

.board-card-meta {
  font-size: 0.71rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}

.pagination-bar {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pagination-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-indicator {
  font-size: 0.78rem;
  font-weight: 700;
}

.empty-state {
  padding: 44px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
}

/* ============================================================================
   MODALS (TICKET DETAIL, LOGIN, SETTINGS)
============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal {
  background: #FFFFFF;
  border-radius: 22px;
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.16s ease-out;
}

.modal-sm { max-width: 420px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 920px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.modal-header-mist {
  background: linear-gradient(180deg, #E4EEFF 0%, #FFFFFF 100%);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.modal-subtitle {
  margin: 3px 0 0;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.modal-close {
  border: none;
  background: var(--surface-soft);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 1.3rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: #E5E7EB; color: var(--text); }

.modal-body {
  padding: 18px 22px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--divider);
}

.form-error {
  background: #FFF1F2;
  color: #BE123C;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/* DETAIL MODAL STYLES */
.detail-header {
  background: linear-gradient(180deg, #EAF1FF 0%, #FFFFFF 100%);
}

.detail-header-left { flex: 1; min-width: 0; }
.detail-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.detail-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }

.ticket-code-lg {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--blue-mid);
  color: #FFFFFF;
  padding: 3px 9px;
  border-radius: 7px;
}

.detail-title {
  font-size: 1.15rem !important;
  margin-bottom: 6px !important;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Retest Banner */
.retest-banner {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  border: 1.5px solid #A78BFA;
  border-radius: 16px;
  padding: 16px 18px;
}

.retest-banner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.retest-banner h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #4C1D95;
}

.retest-fix-quote {
  background: #FFFFFF;
  border-radius: 11px;
  padding: 11px 14px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.retest-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.retest-subform {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #DDD6FE;
}

.refix-alert-banner {
  background: #FFF1F2;
  border: 1.5px solid #FDA4AF;
  border-radius: 14px;
  padding: 12px 16px;
  color: #9F1239;
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.btn-green {
  border: none;
  background: #059669;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-green:hover { background: #047857; }

.btn-danger {
  border: none;
  background: #E11D48;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-danger:hover { background: #BE123C; }

.btn-danger-outline {
  border: 1px solid #FECDD3;
  background: #FFFFFF;
  color: #E11D48;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 9px;
  cursor: pointer;
}
.btn-danger-outline:hover { background: #FFF1F2; }

.detail-card {
  background: var(--surface-tint);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 14px 16px;
}

.detail-card h4 {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.description-text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.88rem;
  color: var(--text);
}

.error-code-block {
  margin-top: 10px;
  background: #111827;
  color: #FCA5A5;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  padding: 10px 13px;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.attachments-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 11px;
}

.gallery-thumb {
  width: 104px;
  height: 82px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: zoom-in;
  background: #FFFFFF;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-deep);
  text-decoration: none;
}

/* Dev Panel */
.dev-panel {
  background: #FFFFFF;
  border: 1.5px solid #D5E3FC;
  border-radius: 16px;
  padding: 16px 18px;
}

.dev-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--divider);
}

.dev-panel-header h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #143A85;
}

.quick-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}

.status-pills-radio {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
}

.status-radio-label:has(input:checked) {
  border-color: var(--blue-mid);
  background: #EFF6FF;
  color: var(--blue-deep);
}

.dev-login-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-tint);
  border: 1px dashed var(--border);
  border-radius: 13px;
  padding: 12px 15px;
  font-size: 0.81rem;
  color: var(--text-secondary);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.timeline-item {
  border: 1px solid var(--divider);
  border-left: 3.5px solid #CBD5E1;
  border-radius: 11px;
  padding: 11px 14px;
  background: #FFFFFF;
}

.timeline-item.type-created { border-left-color: var(--blue-mid); }
.timeline-item.type-fix_update { border-left-color: #6366F1; background: #FAFBFF; }
.timeline-item.type-retest_pass { border-left-color: #059669; background: #F4FDF8; }
.timeline-item.type-retest_fail { border-left-color: #E11D48; background: #FFF7F8; }

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 0.77rem;
}

.timeline-author {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.timeline-time {
  color: var(--text-muted);
  font-size: 0.73rem;
}

.timeline-msg {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.85rem;
}

.timeline-extra {
  margin-top: 7px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Settings Tabs */
.tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--divider);
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.tab-btn.active {
  color: var(--blue-deep);
  border-bottom-color: var(--blue-mid);
}

.inline-add-form {
  display: grid;
  grid-template-columns: 2fr 1.2fr 42px auto;
  gap: 8px;
  margin-bottom: 14px;
}

.inline-add-form-4 {
  grid-template-columns: 1fr 1.2fr 1.1fr 0.9fr auto;
}

.inline-add-form input[type="text"],
.inline-add-form input[type="password"],
.inline-add-form select {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #F4F5F7;
  font-family: inherit;
  font-size: 0.81rem;
}

.inline-add-form input[type="color"] {
  width: 42px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  cursor: pointer;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--divider);
  border-radius: 11px;
  background: var(--surface-tint);
}

.settings-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.stack-form { max-width: 420px; }

/* Lightbox & Toasts */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 6, 23, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox img {
  max-width: 94vw;
  max-height: 82vh;
  border-radius: 12px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-size: 1.6rem;
  cursor: pointer;
}

.lightbox-caption {
  margin-top: 10px;
  color: #E2E8F0;
  font-size: 0.83rem;
}

.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
}

.toast {
  background: #111827;
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-modal);
  animation: modalIn 0.16s ease-out;
}
.toast.toast-success { background: #047857; }
.toast.toast-error { background: #BE123C; }
.toast.toast-info { background: #1D4ED8; }

/* RESPONSIVE (NATIVE MOBILE SHEET FEEL) */
@media (max-width: 720px) {
  .app-stage { padding: 0; }
  .app-shell { border-radius: 0; min-height: 100vh; box-shadow: none; }
  .hero-header { padding: 16px 16px 18px; }
  .screen-body { padding: 14px 16px 84px; }
  .new-ticket-header { padding: 16px 16px 12px; }
  .new-ticket-form { padding: 6px 16px 24px; }
  .help-header { padding: 18px 16px 14px; }
  .hide-xs { display: none !important; }
  .filter-drawer { grid-template-columns: 1fr 1fr; }
  .clean-field-row { grid-template-columns: 1fr; gap: 0; }
  .quick-controls { grid-template-columns: 1fr; }
  .inline-add-form, .inline-add-form-4 { grid-template-columns: 1fr; }
  .need-help-banner { padding: 16px; }
  .support-badge-art { width: 62px; height: 62px; border-radius: 16px; }
  .article-content { padding-left: 16px; }
  .modal-header { padding: 15px 16px; }
  .modal-body { padding: 15px 16px; }
}


/* ============================================================================
   PORTAL ENTRY GATE (REGISTER / SIGN IN) & PASSWORD EYE TOGGLE
============================================================================ */
.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 26px;
  box-shadow: var(--shadow-shell);
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

.auth-card-hero {
  background: linear-gradient(180deg, #4B8BFF 0%, #2166F5 60%, #0E4EE2 100%);
  color: #FFFFFF;
  padding: 28px 26px 24px;
  text-align: center;
}

.auth-logo-circle {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.auth-card-hero h1 {
  margin: 0 0 4px;
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.auth-card-hero p {
  margin: 0;
  font-size: 0.81rem;
  color: rgba(255, 255, 255, 0.86);
}

.auth-card-body {
  background: linear-gradient(180deg, rgba(66, 133, 244, 0.08) 0%, #FFFFFF 54px);
  padding: 22px 24px 26px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #F1F4F9;
  padding: 4px;
  border-radius: 13px;
  margin-bottom: 18px;
}

.auth-mode-tab {
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.auth-mode-tab.active {
  background: #FFFFFF;
  color: var(--blue-deep);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.auth-switch-hint {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.link-btn {
  border: none;
  background: none;
  color: var(--blue-mid);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0 2px;
}
.link-btn:hover { text-decoration: underline; }

/* Password Input with Eye Toggle */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrap input {
  width: 100%;
  padding-right: 44px !important;
}

.eye-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6B7280;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.eye-toggle-btn:hover {
  color: var(--blue-mid);
  background: rgba(31, 98, 242, 0.08);
}

/* ============================================================================
   LINE-BY-LINE CLICK-TO-EXPAND TICKET LIST (6 ITEMS PER PAGE)
============================================================================ */
.feed-sub-hint {
  display: block;
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 1px;
}

.ticket-lines-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--divider);
  border-radius: 16px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.ticket-line {
  border-bottom: 1px solid var(--divider);
  transition: background 0.14s;
}

.ticket-line:last-child {
  border-bottom: none;
}

.ticket-line.expanded {
  background: #FAFBFD;
}

.ticket-line-head {
  width: 100%;
  border: none;
  background: transparent;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.14s;
}

.ticket-line-head:hover {
  background: #F4F8FF;
}

.line-chevron {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #F1F5F9;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.18s ease, background 0.15s, color 0.15s;
}

.ticket-line.expanded .line-chevron {
  transform: rotate(90deg);
  background: #DBEAFE;
  color: var(--blue-deep);
}

.line-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--blue-deep);
  background: #EFF6FF;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

.line-title {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.line-reporter {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-time {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  min-width: 56px;
  text-align: right;
}

/* Inline Expanded Details Accordion */
.ticket-line-expand {
  padding: 2px 16px 16px 47px;
  border-top: 1px dashed var(--divider);
  background: #FAFBFD;
  animation: modalIn 0.14s ease-out;
}

.expand-badges-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 11px 0 10px;
}

.expand-desc {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: pre-wrap;
  line-height: 1.5;
}

.expand-fix-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.expand-retest-callout {
  background: #F5F3FF;
  border: 1px solid #C4B5FD;
  color: #5B21B6;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.82rem;
  margin-bottom: 10px;
}

.expand-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #F1F5F9;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.expand-meta-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.expand-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

@media (max-width: 720px) {
  .ticket-line-head {
    flex-wrap: wrap;
    padding: 12px 12px;
    gap: 7px;
  }
  .line-title {
    flex-basis: 100%;
    order: 3;
    padding-left: 30px;
  }
  .line-right {
    margin-left: auto;
  }
  .line-reporter { display: none; }
  .ticket-line-expand {
    padding: 4px 12px 14px 14px;
  }
}


/* ============================================================================
   EMPHASIZED ELDERLY-FRIENDLY TAGLISH GUIDES (HELP CENTER)
============================================================================ */
.article-featured {
  border: 1.5px solid #BFDBFE;
  box-shadow: 0 6px 20px rgba(31, 98, 242, 0.08);
}

.article-retest {
  border: 1.5px solid #DDD6FE;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.07);
}

.article-icon-box.icon-featured {
  background: linear-gradient(135deg, #3B82F6, #1654E8);
}

.article-icon-box.icon-retest {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

.article-featured .article-title,
.article-retest .article-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0F172A;
}

.guide-content {
  padding: 2px 18px 18px 18px !important;
  font-size: 0.94rem;
  line-height: 1.62;
  color: #1F2937;
}

.guide-intro {
  margin: 0 0 12px !important;
  font-weight: 600;
  color: #334155;
}

.guide-steps {
  list-style: none;
  margin: 0;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 11px 13px;
  margin: 0 !important;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #2563EB;
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.step-num.step-blue { background: #2563EB; }
.step-num.step-purple { background: #7C3AED; }
.step-num.step-green { background: #059669; }

.guide-tip-box {
  margin-top: 13px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 11px;
  padding: 11px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.guide-choice-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.guide-choice-ok {
  display: block;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 0.88rem;
}

.guide-choice-fail {
  display: block;
  background: #FFF1F2;
  border: 1px solid #FECDD3;
  color: #9F1239;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 0.88rem;
}

/* ============================================================================
   ELDERLY-FRIENDLY SIMPLE 4-STEP NEW TICKET FORM
============================================================================ */
.reporter-auto-pill {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E40AF;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.simple-step-field label {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin-bottom: 8px !important;
}

.field-step-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #1654E8);
  color: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.simple-ticket-form input[type="text"],
.simple-ticket-form select,
.simple-ticket-form textarea {
  font-size: 16px !important;
  padding: 14px 16px !important;
  min-height: 52px;
  border: 1.5px solid #E2E8F0 !important;
  background: #F8FAFC !important;
}

.simple-ticket-form input:focus,
.simple-ticket-form select:focus,
.simple-ticket-form textarea:focus {
  background: #FFFFFF !important;
  border-color: #2563EB !important;
}

.simple-dropzone {
  padding: 24px 16px !important;
  border: 2px dashed #93C5FD !important;
  background: #F5F9FF !important;
}

.simple-dropzone .dz-label {
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  color: #1D4ED8 !important;
}

.simple-dropzone .dz-hint {
  font-size: 0.82rem !important;
  color: #475569 !important;
}

.optional-details-box {
  margin-top: 4px;
  margin-bottom: 8px;
}

.optional-toggle-btn {
  width: 100%;
  border: 1px dashed #CBD5E1;
  background: #F8FAFC;
  color: #475569;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.optional-toggle-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.optional-fields {
  margin-top: 12px;
  padding: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
}

.btn-elderly-submit {
  min-height: 54px;
  font-size: 1.02rem !important;
  border-radius: 15px !important;
}

/* ============================================================================
   PERMANENT FIXED MOBILE FOOTER (STAYS VISIBLE EVEN WHILE SCROLLING)
============================================================================ */
.bottom-nav {
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 720px) {
  .bottom-nav {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid #E2E8F0;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.09);
  }

  .bottom-tab {
    padding: 14px 10px;
    font-size: 0.9rem;
  }

  .floating-cta-wrap {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 55;
    padding: 8px 16px 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.92) 55%, rgba(255,255,255,0.98) 100%);
  }

  #ticketsScreen {
    padding-bottom: 138px;
  }

  #helpScreen {
    padding-bottom: 88px;
  }

  #newTicketScreen {
    padding-bottom: 24px;
  }

  .screen-body {
    padding-bottom: 24px;
  }

  .guide-content {
    font-size: 0.96rem;
    padding: 2px 14px 16px 14px !important;
  }

  .guide-steps li {
    padding: 12px;
  }
}
