:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-bg: #eff6ff;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --info: #0284c7;
  --info-bg: #f0f9ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --sidebar-width: 280px;
  --header-height: 64px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, .12);
  --transition: .2s ease;
}

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

html,
body {
  height: 100%
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5
}

a {
  color: var(--primary);
  text-decoration: none
}

input,
select,
textarea,
button {
  font-family: inherit;
  font-size: inherit
}

#publicLayout {
  display: flex;
  flex-direction: column;
  min-height: 100vh
}

/* ─── Public Nav ─── */
.public-nav {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  height: 100px;
  position: sticky;
  top: 0;
  z-index: 100
}

.public-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
  color: var(--gray-900)
}

.public-nav .brand > :first-child {
  padding-right: 18px;
  border-right: 2px solid var(--gray-200)
}

.public-nav .brand i {
  font-size: 40px;
  color: var(--primary)
}

.public-nav .brand img {
  height: 52px;
  object-fit: contain
}

.public-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 40px;
  flex: 1
}

.public-nav .nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--gray-600);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition)
}

.public-nav .nav-links a:hover {
  background: var(--gray-100);
  color: var(--gray-900)
}

.public-nav .nav-links a.active {
  background: var(--primary-bg);
  color: var(--primary)
}

.public-nav .login-btn {
  padding: 8px 20px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition)
}

.public-nav .login-btn:hover {
  background: var(--primary-dark)
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--gray-600);
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  -webkit-tap-highlight-color: transparent
}

.nav-toggle:hover {
  color: var(--gray-900)
}

.nav-links .nav-login-btn {
  display: none
}

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 98
}

@media(max-width:768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    z-index: 99;
    display: none;
    border-bottom: 1px solid var(--gray-200);
    max-height: calc(100vh - 72px);
    overflow-y: auto
  }

  .nav-links a {
    padding: 14px 20px !important;
    font-size: 15px !important;
    border-radius: 0 !important;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--gray-100)
  }

  .nav-links a:last-child {
    border-bottom: none
  }

  .nav-links a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
    color: var(--gray-400)
  }

  .nav-links a.active {
    background: var(--primary-bg) !important;
    color: var(--primary) !important
  }

  .nav-links a.active i {
    color: var(--primary)
  }

  .nav-links .nav-login-btn {
    display: flex;
    margin-top: 4px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px !important;
    margin: 8px 12px;
    justify-content: center;
    padding: 14px 20px !important
  }

  .nav-links .nav-login-btn i {
    color: rgba(255, 255, 255, .8)
  }

  .nav-links.open {
    display: flex
  }
}

/* ─── Public Pages ─── */
.public-page {
  display: none;
  flex: 1;
  width: 100%
}

.public-page.active {
  display: block
}

/* ─── Login Page (split) ─── */
.login-page {
  display: flex;
  min-height: calc(100vh - 64px);
  flex: 1
}

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  padding: 40px;
  position: relative;
  overflow: hidden
}

.login-left .brand-badge {
  position: absolute;
  top: 40px;
  left: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 700
}

.login-left .brand-badge i {
  font-size: 32px
}

.login-left img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.login-left .default-art {
  text-align: center;
  color: rgba(255, 255, 255, .15);
  font-size: 120px
}

.login-left .default-art i {
  display: block
}

.login-right {
  width: 480px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff
}

.login-right .login-form-wrap {
  width: 100%;
  max-width: 380px
}

.login-right .login-form-wrap #loginFormLogo {
  max-height: 56px;
  width: auto;
  margin: 0 auto 20px;
  object-fit: contain
}

.login-right .login-form-wrap h2 {
  font-size: 26px;
  color: var(--gray-900);
  margin-bottom: 4px;
  text-align: center
}

.login-right .login-form-wrap .login-sub {
  color: var(--gray-500);
  margin-bottom: 28px;
  font-size: 14px;
  text-align: center
}

.login-right .login-form-wrap .login-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
  display: none
}

.login-right .login-form-wrap .forgot-link {
  font-size: 14px;
  color: var(--gray-500);
  text-align: center;
  margin-top: 20px
}

.login-right .login-form-wrap .forgot-link a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer
}

@media(max-width:768px) {
  .login-left {
    display: none
  }

  .login-right {
    width: 100%
  }

  .login-page {
    min-height: calc(100vh - 56px)
  }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  color: #fff;
  padding: clamp(48px, 8vw, 100px) clamp(20px, 6vw, 64px);
  text-align: center
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 12px
}

.hero p {
  font-size: 18px;
  opacity: .9;
  margin-bottom: 32px;
  max-width: 600px;
  margin: 0 auto 32px
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap
}

.hero-actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition)
}

.hero-actions .btn-white {
  background: #fff;
  color: var(--primary)
}

.hero-actions .btn-white:hover {
  background: var(--gray-100)
}

.hero-actions .btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .5);
  color: #fff
}

.hero-actions .btn-outline-light:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .1)
}

/* Quick cards */
.quick-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 32px;
  padding: clamp(24px, 4vw, 40px) clamp(16px, 4vw, 48px);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto
}

.quick-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow);
  text-align: center;
  cursor: pointer;
  transition: var(--transition)
}

.quick-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg)
}

.quick-card i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 18px
}

.quick-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 700
}

.quick-card p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.5
}

/* ═══════════════════════════════════════════════════════════ */
/* LANDING PAGE - Light Modern Theme                         */
/* ═══════════════════════════════════════════════════════════ */

.lm-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px
}

/* Hero */
.lm-hero {
  position: relative;
  height: 80vh;
  min-height: 540px;
  overflow: hidden
}
.lm-hero-slides {
  position: absolute;
  inset: 0
}
.lm-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out
}
.lm-hero-slide.active {
  opacity: 1
}
.lm-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 30, .55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1
}

/* ── Left: Content ── */
.lm-hero-content {
  position: absolute;
  z-index: 3;
  color: #fff;
  padding: 60px 56px 60px clamp(32px, 6vw, 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%
}
.lm-hero-content h1 {
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 8px;
  letter-spacing: -.5px;
  background: linear-gradient(90deg, #fff 0%, #fff 35%, #fbbf24 50%, #fff 65%, #fff 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: lmShine 3s ease-in-out infinite, lmFadeUp .8s ease-out both;
  animation-delay: 0s, .3s
}
@keyframes lmShine {
  0% { background-position: 100% 50% }
  100% { background-position: -100% 50% }
}
@keyframes lmFadeUp {
  from { opacity: 0; transform: translateY(30px) }
  to { opacity: 1; transform: translateY(0) }
}
.lm-hero-content h1 span {
  font-weight: 800;
  display: block;
  letter-spacing: -1.5px
}
.lm-hero-content p {
  font-size: 15px;
  opacity: .7;
  max-width: 380px;
  margin-bottom: 36px;
  margin-top: 16px;
  line-height: 1.75;
  font-weight: 400;
  animation: lmFadeUp .8s ease-out both;
  animation-delay: .5s
}
.lm-hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: lmFadeUp .8s ease-out both;
  animation-delay: .7s
}
.lm-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: all .3s cubic-bezier(.25,.8,.25,1);
  text-decoration: none;
  border: none
}
.lm-btn i {
  font-size: 13px
}
.lm-btn-solid {
  background: #fff;
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  animation: lmBtnPulse 3s ease-in-out infinite
}
@keyframes lmBtnPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(0,0,0,.12) }
  50% { box-shadow: 0 4px 24px rgba(251,191,36,.35) }
}
.lm-btn-solid:hover {
  background: #f0f0f0;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.25)
}
.lm-btn-ghost {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.3);
  color: #fff
}
.lm-btn-ghost:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.55);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15)
}

/* ── Right: Image Card ── */
.lm-hero-images {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 48%;
  z-index: 2;
  padding: 120px 48px 120px 16px
}
.lm-hero-img-card {
  position: absolute;
  top: 120px;
  right: 48px;
  bottom: 120px;
  left: 16px;
  border-radius: 14px;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.4),
              0 4px 12px rgba(0,0,0,.25)
}
.lm-hero-img-card.active {
  opacity: 1
}

/* ── Dots ── */
.lm-hero-dots {
  position: absolute;
  bottom: 32px;
  left: 24%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 10px
}
.lm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .3s ease;
  border: 1px solid rgba(255,255,255,.15)
}
.lm-dot:hover {
  background: rgba(255,255,255,.6)
}
.lm-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 4px;
  border-color: rgba(255,255,255,.4);
  box-shadow: 0 0 12px rgba(255,255,255,.3)
}
.lm-hero-scroll {
  position: absolute;
  bottom: 48px;
  right: 40px;
  z-index: 3;
  width: 24px;
  height: 40px;
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 12px;
  display: block
}
.lm-hero-scroll span {
  display: block;
  width: 3px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: lmScrollDot 1.5s ease-in-out infinite
}
@keyframes lmScrollDot {
  0% { opacity: 1; top: 8px }
  100% { opacity: 0; top: 24px }
}

/* Welcome */
.lm-welcome {
  padding: 100px 0;
  background: #fff
}
.lm-welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center
}
.lm-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px
}
.lm-welcome-text h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
  line-height: 1.15
}
.lm-welcome-text p {
  font-size: 15px;
  color: #64748b;
  line-height: 1.75;
  margin-bottom: 28px
}
.lm-welcome-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}
.lm-info-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 32px;
  transition: all .3s;
  margin-bottom: 20px
}
.lm-info-card:last-child {
  margin-bottom: 0
}
.lm-info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.06);
  border-color: transparent
}
.lm-info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 16px
}
.lm-info-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px
}
.lm-info-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.65
}

/* Chairman */
.lm-message {
  padding: 100px 0;
  background: #f8fafc
}
.lm-message-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: start
}
.lm-message-left h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.15
}
.lm-quote-icon {
  font-size: 32px;
  color: #e2e8f0;
  margin-bottom: 16px
}
.lm-message-right p {
  font-size: 15px;
  color: #64748b;
  line-height: 1.75;
  margin-bottom: 16px
}
.lm-message-author {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px
}
.lm-message-author strong {
  font-size: 15px;
  color: #1e293b
}
.lm-message-author span {
  font-size: 13px;
  color: #94a3b8
}

/* Services */
.lm-services {
  padding: 100px 0;
  background: #fff
}
.lm-section-head {
  text-align: center;
  margin-bottom: 56px
}
.lm-section-head h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 12px
}
.lm-section-head p {
  font-size: 16px;
  color: #94a3b8;
  max-width: 480px;
  margin: 0 auto
}
.lm-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px
}
.lm-service-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  cursor: pointer;
  transition: all .3s
}
.lm-service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.07);
  border-color: transparent
}
.lm-service-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 20px
}
.lm-service-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px
}
.lm-service-card p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 20px
}
.lm-service-link {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px
}
.lm-service-link i {
  font-size: 12px;
  transition: transform .2s
}
.lm-service-card:hover .lm-service-link i {
  transform: translateX(4px)
}

/* Stats */
.lm-stats {
  padding: 80px 0;
  background: #f8fafc
}
.lm-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px
}
.lm-stat-item {
  text-align: center;
  padding: 32px 16px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  transition: all .3s
}
.lm-stat-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.05)
}
.lm-stat-num {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1;
  margin-bottom: 8px
}
.lm-stat-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px
}

/* Contact */
.lm-contact {
  padding: 100px 0;
  background: #fff
}
.lm-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 24px;
  align-items: start
}
.lm-contact-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  transition: all .3s
}
.lm-contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,.05)
}
.lm-contact-featured {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border: none;
  padding: 40px 28px
}
.lm-contact-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(79,70,229,.25)
}
.lm-contact-featured-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  padding: 5px 16px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px
}
.lm-contact-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 auto 16px
}
.lm-contact-featured .lm-contact-icon {
  background: rgba(255,255,255,.18);
  color: #fff
}
.lm-contact-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1e293b
}
.lm-contact-featured h4 {
  color: #fff
}
.lm-contact-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.65
}
.lm-contact-featured p {
  color: rgba(255,255,255,.7)
}
.lm-contact-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px
}
.lm-contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px
}
.lm-contact-row i {
  font-size: 13px;
  color: rgba(255,255,255,.6)
}

/* Footer */
.lm-footer {
  padding: 0;
  background: #1a1a2e
}
.lm-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
  text-align: center
}
.lm-footer-brand {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px
}
.lm-footer-brand i {
  color: #818cf8
}
.lm-footer-links {
  display: flex;
  gap: 24px
}
.lm-footer-links a {
  color: rgba(255,255,255,.45);
  font-size: 13px;
  cursor: pointer;
  transition: color .2s
}
.lm-footer-links a:hover {
  color: #fff
}
.lm-footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,.3)
}
.lm-footer-copy strong {
  color: rgba(255,255,255,.6)
}

/* Hide old simple footer on home page */
#pub-home ~ .public-footer { display: none }

/* Responsive */
@media(max-width:1024px) {
  .lm-hero-content { width: 55%; padding-left: 40px }
  .lm-hero-images { width: 45% }
  .lm-hero-img-card { top: 100px; right: 36px; bottom: 100px; left: 10px }
  .lm-welcome-grid { grid-template-columns: 1fr; gap: 40px }
  .lm-message-grid { grid-template-columns: 1fr; gap: 32px }
  .lm-services-grid { grid-template-columns: 1fr 1fr }
  .lm-stats-grid { grid-template-columns: 1fr 1fr }
  .lm-contact-grid { grid-template-columns: 1fr }
}

@media(max-width:768px) {
  .lm-hero { min-height: 420px }
  .lm-hero-content {
    position: relative;
    width: 100%;
    left: auto;
    top: auto;
    bottom: auto;
    max-width: none;
    padding: 32px 24px 36px;
    border-right: none
  }
  .lm-hero-images { display: none }
  .lm-hero-content h1 { font-size: clamp(28px, 8vw, 38px) }
  .lm-hero-content p { font-size: 14px; margin-bottom: 28px }
  .lm-hero-btns { flex-direction: column }
  .lm-hero-btns .lm-btn { width: 100%; max-width: 280px; justify-content: center }
  .lm-hero-scroll { display: none }
  .lm-hero-dots { left: 50% }
  .lm-welcome { padding: 64px 0 }
  .lm-welcome-text h2 { font-size: 28px }
  .lm-message { padding: 64px 0 }
  .lm-services { padding: 64px 0 }
  .lm-services-grid { grid-template-columns: 1fr }
  .lm-stats { padding: 48px 0 }
  .lm-contact { padding: 64px 0 }
  .lm-footer-links { flex-wrap: wrap; justify-content: center; gap: 16px }
}

@media(max-width:480px) {
  .lm-hero { min-height: 360px }
  .lm-stats-grid { grid-template-columns: 1fr 1fr; gap: 12px }
  .lm-stat-item { padding: 24px 12px }
  .lm-stat-num { font-size: 28px }
}

/* ─── Ticket Submit - Page Hero ─── */
.submit-hero {
  background-image: url('images/login/image1_6a6050a9b13706.25355787_1784697001726.jpg');
  background-size: cover;
  background-position: center;
  padding: 48px clamp(20px, 5vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden
}

.submit-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none
}

.submit-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .5
}

.submit-hero-glass {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 32px 48px;
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2)
}

.submit-hero h1 {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px
}

.submit-hero p {
  font-size: clamp(14px, 2vw, 16px);
  color: rgba(255, 255, 255, .85);
  margin: 0 auto;
  max-width: 500px;
  line-height: 1.5
}

/* ─── Card ─── */
.ts-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .02), 0 12px 40px rgba(0, 0, 0, .06);
  overflow: hidden;
  max-width: 840px;
  margin: -32px auto 40px;
  position: relative;
  z-index: 2
}

.ts-form {
  padding: 0
}

/* ─── Sections ─── */
.ts-section {
  padding: 28px 36px 4px
}

.ts-section+.ts-section {
  border-top: 1px solid #f0f0f5
}

.ts-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px
}

.ts-section-head .ts-sh-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px
}

.ts-section-head .ts-sh-icon.purple {
  background: #f0f0ff;
  color: #7c3aed
}

.ts-section-head .ts-sh-icon.blue {
  background: #eff6ff;
  color: #2563eb
}

.ts-section-head .ts-sh-icon.green {
  background: #ecfdf5;
  color: #059669
}

.ts-section-head .ts-sh-icon.amber {
  background: #fffbeb;
  color: #d97706
}

.ts-section-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  margin: 2px 0 0;
  letter-spacing: -.2px
}

.ts-section-head p {
  font-size: 13px;
  color: var(--gray-500);
  margin: 2px 0 0
}

/* ─── Fields ─── */
.ts-field {
  position: relative;
  margin-bottom: 18px
}

.ts-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px
}

.ts-field label .req {
  color: #ef4444
}

.ts-input-wrap {
  position: relative;
  display: flex;
  align-items: center
}

.ts-input-wrap .ts-input-icon {
  position: absolute;
  left: 13px;
  font-size: 13px;
  color: var(--gray-400);
  z-index: 1;
  transition: color .2s;
  width: 16px;
  text-align: center;
  pointer-events: none
}

.ts-input-wrap:focus-within .ts-input-icon {
  color: var(--primary)
}

.ts-input-wrap .ts-input {
  padding-left: 38px
}

.ts-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  background: #fff;
  color: #111
}

.ts-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1)
}

.ts-input:hover {
  border-color: #d1d5db
}

.ts-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1)
}

.ts-input.error:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1)
}

.ts-input::placeholder {
  color: #9ca3af;
  font-size: 13.5px
}

/* ─── Textarea ─── */
.ts-textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.7;
  padding: 13px 16px
}

.ts-textarea-wrap {
  position: relative
}

.ts-char-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
  pointer-events: none;
  background: #fff;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  line-height: 1;
  transition: color .2s, background .2s
}

.ts-char-count.warn {
  color: #d97706;
  border-color: #fde68a;
  background: #fffbeb
}

.ts-char-count.full {
  color: #ef4444;
  border-color: #fecaca;
  background: #fef2f2
}

/* ─── Select ─── */
.ts-select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer
}

.ts-select-wrap {
  position: relative
}

.ts-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #9ca3af;
  pointer-events: none;
  transition: all .2s
}

.ts-select-wrap:focus-within .ts-select-arrow {
  color: var(--primary);
  transform: translateY(-50%) rotate(180deg)
}

/* ─── Priority color indicators ─── */
.ts-priority-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle
}

.ts-priority-dot.low {
  background: #6b7280
}

.ts-priority-dot.medium {
  background: #d97706
}

.ts-priority-dot.high {
  background: #ea580c
}

.ts-priority-dot.critical {
  background: #dc2626
}

/* ─── Grid ─── */
.ts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.ts-row-3 {
  grid-template-columns: 1fr 1fr 1fr
}

/* ─── Validation messages ─── */
.ts-field-msg {
  font-size: 12px;
  color: #ef4444;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 0;
  opacity: 0;
  transition: opacity .2s;
  font-weight: 500
}

.ts-field-msg.show {
  opacity: 1
}

.ts-field-msg i {
  font-size: 10px
}

/* ─── File Upload ─── */
.ts-file-zone {
  border: 2px dashed #d1d5db;
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: #fafafa;
  position: relative
}

.ts-file-zone::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 14px;
  border: 2px solid transparent;
  transition: border-color .25s;
  pointer-events: none
}

.ts-file-zone:hover {
  border-color: var(--primary);
  background: #f5f7ff
}

.ts-file-zone.dragover {
  border-color: var(--primary);
  background: #f0f4ff;
  transform: scale(1.01)
}

.ts-file-zone.has-file {
  border-style: solid;
  border-color: #059669;
  background: #f0fdf4;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.ts-file-zone-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #f0f4ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 22px;
  transition: all .25s
}

.ts-file-zone:hover .ts-file-zone-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05)
}

.ts-file-zone.dragover .ts-file-zone-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.08)
}

.ts-file-zone-text {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.5
}

.ts-file-zone-browse {
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px
}

.ts-file-preview {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  display: none;
  flex-shrink: 0
}

.ts-file-zone.has-file .ts-file-zone-icon {
  width: 36px;
  height: 36px;
  font-size: 16px;
  background: #059669;
  color: #fff;
  margin: 0
}

.ts-file-info {
  display: flex;
  align-items: center;
  gap: 12px
}

.ts-file-info .fi-icon {
  font-size: 22px;
  color: var(--primary)
}

.ts-file-info .fi-name {
  font-size: 13px;
  font-weight: 600;
  color: #111
}

.ts-file-info .fi-size {
  font-size: 11px;
  color: var(--gray-500)
}

.ts-file-remove {
  cursor: pointer;
  color: #9ca3af;
  font-size: 22px;
  transition: color .2s;
  padding: 2px 6px;
  border-radius: 6px;
  line-height: 1
}

.ts-file-remove:hover {
  color: #ef4444;
  background: #fef2f2
}

/* ─── Submit Button ─── */
.ts-btn-footer {
  padding: 4px 36px 32px
}

.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all .3s;
  position: relative;
  overflow: hidden
}

.ts-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, .15) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .6s
}

.ts-btn:hover::before {
  transform: translateX(100%)
}

.ts-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, .35)
}

.ts-btn:active {
  transform: translateY(0)
}

.ts-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important
}

.ts-btn .spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spinBtn .65s linear infinite;
  display: none
}

.ts-btn.loading .spinner {
  display: inline-block
}

.ts-btn.loading .btn-text {
  opacity: .7
}

@keyframes spinBtn {
  to {
    transform: rotate(360deg)
  }
}

.ts-btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid #e5e7eb
}

.ts-btn-outline:hover {
  background: #f9fafb;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, .15) !important
}

/* ─── Success State ─── */
.ts-success {
  display: none;
  text-align: center;
  padding: 60px 36px;
  animation: successFadeIn .5s ease
}

.ts-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 22px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center
}

.ts-success-icon .check-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #059669;
  opacity: .1;
  animation: successPulse 1.5s ease infinite
}

.ts-success-icon i {
  font-size: 40px;
  color: #059669;
  position: relative;
  z-index: 1;
  animation: successCheck .5s ease
}

.ts-success h3 {
  font-size: 25px;
  font-weight: 800;
  color: #111;
  margin: 0 0 6px;
  letter-spacing: -.3px
}

.ts-success .ts-sub {
  font-size: 15px;
  color: var(--gray-500);
  margin: 0 0 20px
}

.ts-success .ticket-id-wrap {
  background: #f0f4ff;
  border-radius: 14px;
  padding: 18px 24px;
  margin: 0 auto 6px;
  max-width: 300px;
  border: 1px solid rgba(37, 99, 235, .12);
  display: inline-block
}

.ts-success .ticket-id-wrap .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #6b7280;
  font-weight: 600
}

.ts-success .ticket-id {
  font-size: 26px;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: .5px;
  font-family: monospace
}

.ts-success .ts-note {
  font-size: 13px;
  color: #9ca3af;
  margin: 16px 0 0
}

.ts-success .ts-btn-outline {
  width: auto;
  display: inline-flex;
  padding: 12px 28px
}

.ts-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap
}

@keyframes successFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes successCheck {
  0% {
    transform: scale(0)
  }

  60% {
    transform: scale(1.15)
  }

  to {
    transform: scale(1)
  }
}

@keyframes successPulse {
  0% {
    transform: scale(1);
    opacity: .1
  }

  50% {
    transform: scale(1.4);
    opacity: .05
  }

  to {
    transform: scale(1);
    opacity: .1
  }
}

/* ─── Responsive ─── */
@media(max-width:768px) {
  .ts-card {
    margin: -20px 0 24px;
    border-radius: 20px
  }

  .ts-section {
    padding: 22px 20px 2px
  }

  .ts-section+.ts-section {
    border-top-color: #f3f3f8
  }

  .ts-row,
  .ts-row-3 {
    grid-template-columns: 1fr !important;
    gap: 12px
  }

  .ts-btn-footer {
    padding: 4px 20px 24px
  }

  .ts-file-zone {
    padding: 22px 18px
  }

  .ts-success {
    padding: 40px 20px
  }

  .submit-hero {
    padding: 36px 20px
  }
  .submit-hero-glass {
    padding: 24px 20px
  }
}

@media(max-width:480px) {
  .ts-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px
  }
}

.form-group {
  margin-bottom: 18px
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px
}

.form-group label i {
  width: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-400)
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 15px;
  transition: var(--transition);
  outline: none;
  background: #fff
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15)
}

textarea.form-control {
  resize: vertical;
  min-height: 100px
}

select.form-control {
  cursor: pointer
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition)
}

.btn-primary {
  background: var(--primary);
  color: #fff
}

.btn-primary:hover {
  background: var(--primary-dark)
}

.btn-success {
  background: var(--success);
  color: #fff
}

.btn-success:hover {
  background: #047857
}

.btn-danger {
  background: var(--danger);
  color: #fff
}

.btn-warning {
  background: var(--warning);
  color: #fff
}

.btn-info {
  background: var(--info);
  color: #fff
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--gray-300);
  color: var(--gray-700)
}

.btn-outline:hover {
  background: var(--gray-50)
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px
}

.btn-block {
  width: 100%
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed
}

/* ─── Card ─── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.card-header h3,
.card-header h4 {
  font-size: 16px
}

.card-body {
  padding: 24px
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50)
}

/* ─── Dashboard Stats Grid ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  position: relative;
  overflow: hidden
}

.stat-card .stat-icon {
  font-size: 22px;
  margin-bottom: 6px
}

.stat-card .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-900)
}

.stat-card .stat-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
  font-weight: 500
}

.stat-card .stat-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 2px 0 0
}

.stat-card .stat-bg-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  font-size: 42px;
  opacity: .06;
  color: inherit
}

.stat-total .stat-bar {
  background: var(--primary);
  width: 100%
}

.stat-open .stat-bar {
  background: var(--info);
  width: 70%
}

.stat-assigned .stat-bar {
  background: #4338ca;
  width: 55%
}

.stat-progress .stat-bar {
  background: var(--warning);
  width: 40%
}

.stat-completed .stat-bar {
  background: #16a34a;
  width: 60%
}

.stat-verified .stat-bar {
  background: var(--success);
  width: 80%
}

.stat-critical .stat-bar {
  background: var(--danger);
  width: 30%
}

/* Desktop dashboard redesign */
.dash-welcome {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: clamp(20px, 2vw, 28px);
  width: 100%
}

.dash-welcome span {
  color: var(--gray-500);
  font-weight: 400;
  font-size: clamp(13px, 1vw, 15px);
  display: block;
  margin-top: 4px
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 1.2vw, 20px);
  margin-bottom: clamp(24px, 2vw, 32px);
  width: 100%
}

@media(min-width:1200px) {
  .dash-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media(min-width:1600px) {
  .dash-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media(max-width:1199px) {
  .dash-stats {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px
  }
}

.dash-stat-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  position: relative;
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-100, #f1f5f9)
}

.dash-stat-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
  transform: translateY(-3px)
}

.dash-stat-card .ds-accent {
  height: 4px;
  width: 100%;
  flex-shrink: 0
}

.dash-stat-card .ds-body {
  padding: 22px 22px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1
}

.dash-stat-card .ds-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,.12)
}

.dash-stat-card .ds-info {
  flex: 1;
  min-width: 0
}

.dash-stat-card .ds-number {
  font-size: 30px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.5px
}

.dash-stat-card .ds-label {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px
}

/* Icon animations */
@keyframes iconFloat {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-4px)
  }
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.08)
  }
}

@keyframes iconSpin {
  0% {
    transform: rotate(0deg)
  }

  100% {
    transform: rotate(360deg)
  }
}

@keyframes iconBounce {

  0%,
  100% {
    transform: translateY(0)
  }

  25% {
    transform: translateY(-6px)
  }

  50% {
    transform: translateY(0)
  }

  75% {
    transform: translateY(-3px)
  }
}

.ds-icon-wrap .fa-ticket-alt {
  animation: iconFloat 3s ease-in-out infinite
}

.ds-icon-wrap .fa-folder-open {
  animation: iconPulse 2.5s ease-in-out infinite
}

.ds-icon-wrap .fa-user-check {
  animation: iconBounce 2.8s ease-in-out infinite
}

.ds-icon-wrap .fa-spinner {
  animation: iconSpin 1.5s linear infinite
}

.ds-icon-wrap .fa-check-circle {
  animation: iconPulse 2s ease-in-out infinite
}

.ds-icon-wrap .fa-check-double {
  animation: iconFloat 2.6s ease-in-out infinite
}

.ds-icon-wrap .fa-exclamation-triangle {
  animation: iconBounce 2s ease-in-out infinite
}

/* Mobile icon animations reuse same keyframes */
.ms-icon .fa-ticket-alt {
  animation: iconFloat 3s ease-in-out infinite
}

.ms-icon .fa-folder-open {
  animation: iconPulse 2.5s ease-in-out infinite
}

.ms-icon .fa-user-check {
  animation: iconBounce 2.8s ease-in-out infinite
}

.ms-icon .fa-spinner {
  animation: iconSpin 1.5s linear infinite
}

.ms-icon .fa-check-circle {
  animation: iconPulse 2s ease-in-out infinite
}

.ms-icon .fa-check-double {
  animation: iconFloat 2.6s ease-in-out infinite
}

.ms-icon .fa-exclamation-triangle {
  animation: iconBounce 2s ease-in-out infinite
}

.ds-icon-wrap .fa-user-plus {
  animation: iconPulse 2.2s ease-in-out infinite
}

.ms-icon .fa-user-plus {
  animation: iconPulse 2.2s ease-in-out infinite
}

@media(max-width:1199px) {
  .dash-stat-card .ds-body {
    padding: 16px 16px 14px;
    gap: 12px
  }

  .dash-stat-card .ds-icon-wrap {
    width: 42px;
    height: 42px;
    font-size: 17px;
    border-radius: 12px
  }

  .dash-stat-card .ds-number {
    font-size: 26px
  }

  .dash-stat-card .ds-label {
    font-size: 11px
  }
}

.dash-stat-card .ds-trend {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  display: none
}

.dash-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 1.5vw, 24px);
  margin-bottom: clamp(24px, 2vw, 32px);
  width: 100%
}

@media(max-width:1199px) {
  .dash-charts {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px
  }
}

.dash-chart-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  border-top: 3px solid var(--primary)
}

.dash-chart-card:last-child {
  border-top-color: var(--warning)
}

.dash-chart-card h4 {
  font-size: clamp(14px, 1vw, 15px);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px
}

@media(max-width:1199px) {
  .dash-chart-card {
    border-radius: 12px;
    padding: 20px
  }
}

.dashboard-table-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  overflow: hidden;
  margin-bottom: 24px;
  width: 100%;
  border-top: 3px solid var(--primary)
}

@media(max-width:1199px) {
  .dashboard-table-card {
    border-radius: 12px
  }
}

.dash-bottom-grid {
  width: 100%;
  margin-bottom: 0
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px
}

.dashboard-table-card table {
  table-layout: auto;
  width: 100%
}

.dashboard-table-card td,
.dashboard-table-card th {
  white-space: nowrap;
  padding: 10px 14px;
  font-size: 13px
}

.dashboard-table-card td:first-child,
.dashboard-table-card th:first-child {
  padding-left: 20px
}

.dashboard-table-card td:last-child,
.dashboard-table-card th:last-child {
  padding-right: 20px
}

.dashboard-table-card td:nth-child(2),
.dashboard-table-card th:nth-child(2) {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

@media(max-width:768px) {
  .dash-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px
  }
}

/* ─── Mobile Dashboard ─── */
.m-dash {
  padding: 0;
  width: 100%
}

.m-dash-greeting {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
  width: 100%
}

.m-dash-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 20px;
  width: 100%
}

.m-dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 1.5vw, 12px);
  margin-bottom: 20px;
  width: 100%
}

.m-stat-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--gray-100, #f1f5f9);
  transition: box-shadow .25s, transform .25s
}

.m-stat-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
  transform: translateY(-2px)
}

.m-stat-card .ms-accent {
  width: 4px;
  align-self: stretch;
  flex-shrink: 0
}

.m-stat-card .ms-body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 10px;
  flex: 1
}

.m-stat-card .ms-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,.12)
}

.m-stat-card .ms-info {
  flex: 1;
  min-width: 0
}

.m-stat-card .ms-number {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: -0.5px
}

.m-stat-card .ms-label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px
}

.m-dash-section {
  margin-bottom: 20px;
  width: 100%
}

.m-dash-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px
}

.m-chart-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  margin-bottom: 12px;
  width: 100%;
  border-top: 3px solid var(--primary)
}

.m-chart-card:last-of-type {
  border-top-color: var(--warning)
}

.m-chart-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 12px
}

/* mobile ticket list (cards, not table) */
.m-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%
}

.m-ticket-item {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  cursor: pointer;
  transition: box-shadow .2s
}

.m-ticket-item:active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12)
}

.m-ticket-item .mt-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px
}

.m-ticket-item .mt-id {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-900)
}

.m-ticket-item .mt-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.m-ticket-item .mt-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center
}

.m-ticket-item .mt-date {
  font-size: 11px;
  color: var(--gray-400)
}

/* ─── Table ─── */
.table-container {
  overflow-x: auto;
  padding-bottom: 20px
}

table {
  width: 100%;
  border-collapse: collapse
}

table th {
  text-align: left;
  padding: clamp(12px, 1vw, 14px) clamp(16px, 1.5vw, 20px);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
  vertical-align: middle
}

table td {
  padding: clamp(12px, 1vw, 14px) clamp(16px, 1.5vw, 20px);
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  vertical-align: middle
}

table td:first-child,
table th:first-child {
  white-space: nowrap;
  width: 1%;
}

table td:nth-child(2),
table th:nth-child(2) {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

table tr {
  transition: background .15s
}

table tr:hover {
  background: var(--gray-50)
}

table .actions {
  display: table-cell;
  white-space: nowrap;
  vertical-align: middle
}

table .actions > button,
table .actions > a {
  margin-right: 4px
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  gap: 4px;
  white-space: nowrap
}

.badge-open {
  background: var(--info-bg);
  color: var(--info)
}

.badge-assigned {
  background: #eef2ff;
  color: #4338ca
}

.badge-inprogress {
  background: var(--warning-bg);
  color: var(--warning)
}

.badge-completed {
  background: #f0fdf4;
  color: #16a34a
}

.badge-verified {
  background: var(--success-bg);
  color: var(--success)
}

.badge-rejected {
  background: #fef2f2;
  color: #dc2626
}

.badge-critical {
  background: var(--danger-bg);
  color: var(--danger)
}

.badge-high {
  background: #fef2f2;
  color: #dc2626
}

.badge-medium {
  background: var(--warning-bg);
  color: var(--warning)
}

.badge-low {
  background: var(--success-bg);
  color: var(--success)
}

.badge-admin {
  background: #fef2f2;
  color: #dc2626
}

.badge-manager {
  background: #eef2ff;
  color: #4338ca
}

.badge-agent {
  background: var(--primary-bg);
  color: var(--primary)
}

.badge-staff {
  background: var(--gray-100);
  color: var(--gray-600)
}

.badge-active {
  background: #f0fdf4;
  color: #16a34a
}

.badge-inactive {
  background: #fef2f2;
  color: #dc2626
}

/* ─── Filters ─── */
.filters-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center
}

.filters-bar .search-box {
  position: relative;
  flex: 1;
  min-width: 200px
}

.filters-bar .search-box input {
  padding-left: 36px;
  width: 100%
}

.filters-bar .search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400)
}

/* ─── Modal ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px
}

.modal-overlay.active {
  display: flex
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3)
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1
}

.modal-header h3 {
  font-size: 18px
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 18px;
  transition: var(--transition)
}

.modal-close:hover {
  background: var(--gray-200)
}

.modal-body {
  padding: 24px
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: flex-end;
  gap: 12px
}

.modal-user {
  max-width: 640px
}

.user-form-avatar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 20px
}

.ufa-avatar-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  cursor: pointer;
  flex-shrink: 0
}

.ufa-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  overflow: hidden;
  transition: opacity .2s
}

.ufa-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.ufa-avatar-wrap:hover .ufa-circle {
  opacity: .85
}

.ufa-camera {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  border: 2px solid #fff;
  transition: transform .2s
}

.ufa-avatar-wrap:hover .ufa-camera {
  transform: scale(1.1)
}

.ufa-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900)
}

.ufa-role {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 2px
}

.user-form-section {
  margin-bottom: 20px
}

.user-form-section:last-child {
  margin-bottom: 0
}

.uf-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px
}

.uf-section-title i {
  color: var(--primary);
  width: 16px;
  text-align: center;
  font-size: 14px
}

.uf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin-bottom: 12px
}

.uf-row:last-child {
  margin-bottom: 0
}

@media(max-width:600px) {
  .uf-row {
    grid-template-columns: 1fr
  }
}

/* ─── Comments ─── */
.comment {
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 10px
}

.comment .comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px
}

.comment .comment-author {
  font-weight: 600;
  font-size: 14px
}

.comment .comment-date {
  font-size: 12px;
  color: var(--gray-400)
}

.comment .comment-body {
  font-size: 14px;
  color: var(--gray-700)
}

/* ─── Knowledge Base Cards ─── */
.kb-wrap {
  max-width: 960px;
  margin: 0 auto
}

.kb-header-card {
  background: linear-gradient(135deg, var(--primary), #1e40af);
  border-radius: 16px;
  padding: 36px 40px;
  margin-bottom: 28px;
  color: #fff
}

.kb-header-card h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px
}

.kb-header-card h2 i {
  font-size: 26px
}

.kb-header-card p {
  font-size: 14px;
  margin: 0 0 20px;
  opacity: .85
}

.kb-search-wrap {
  position: relative;
  max-width: 500px
}

.kb-search-wrap i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  z-index: 1
}

.kb-search-wrap input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  background: #fff;
  font-family: inherit;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1)
}

.kb-search-wrap input:focus {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15)
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px
}

.kb-thumb-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 12px 12px 0 0
}

.kb-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s
}

.kb-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 20px rgba(0, 0, 0, .04);
  cursor: pointer;
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gray-100)
}

.kb-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .1)
}

.kb-card:hover .kb-thumb {
  transform: scale(1.06)
}

.kb-card-body {
  padding: 18px 20px 12px;
  flex: 1;
  display: flex;
  flex-direction: column
}

.kb-card .kb-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(37, 99, 235, .08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: .3px;
  width: fit-content
}

.kb-card .kb-cat i {
  font-size: 10px
}

.kb-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.kb-card p {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.kb-card-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px 14px;
  font-size: 12px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-50)
}

.kb-card-footer span {
  display: flex;
  align-items: center;
  gap: 5px
}

/* KB View Modal */
.kb-view-header {
  background: linear-gradient(135deg, var(--primary), #1e40af);
  padding: 24px 28px;
  color: #fff;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.kb-view-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700
}

.kb-view-header .kb-view-cat {
  background: rgba(255, 255, 255, .2);
  padding: 4px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600
}

.kb-view-body {
  padding: 28px;
  line-height: 1.8;
  font-size: 15px;
  color: var(--gray-700)
}

.kb-view-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 16px 0 8px
}

.kb-view-body ul,
.kb-view-body ol {
  padding-left: 24px;
  margin: 8px 0
}

.kb-view-body li {
  margin: 4px 0
}

.kb-view-body a {
  color: var(--primary);
  text-decoration: underline
}

/* KB Article Form */
.kb-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  background: #fff;
  border: 2px solid var(--gray-200);
  border-bottom: 0;
  border-radius: 10px 10px 0 0
}

.kb-editor-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--gray-600);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s
}

.kb-editor-btn:hover {
  background: var(--gray-100);
  color: var(--primary)
}

.kb-editor-btn:active {
  background: var(--gray-200)
}

.kb-editor-sep {
  width: 1px;
  height: 24px;
  background: var(--gray-200);
  margin: 0 4px
}

.kb-editor-content {
  min-height: 280px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 0 0 10px 10px;
  font-size: 14px;
  line-height: 1.7;
  outline: none;
  background: #fff;
  transition: border-color .2s;
  overflow-y: auto
}

.kb-editor-content:focus {
  border-color: var(--primary)
}

.kb-editor-content h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 12px 0 6px
}

.kb-editor-content ul,
.kb-editor-content ol {
  padding-left: 24px;
  margin: 6px 0
}

.kb-editor-content li {
  margin: 2px 0
}

.kb-editor-content a {
  color: var(--primary);
  text-decoration: underline
}

.kb-editor-content:empty:before {
  content: attr(placeholder);
  color: #94a3b8;
  pointer-events: none
}

.kb-form-wrap {
  padding: 0
}

.kb-form-group {
  margin-bottom: 20px
}

.kb-form-group:last-child {
  margin-bottom: 0
}

.kb-form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px
}

.kb-form-group label i {
  color: var(--primary);
  width: 16px;
  text-align: center;
  font-size: 14px
}

.kb-form-group input,
.kb-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  background: var(--gray-50);
  font-family: inherit;
  box-sizing: border-box
}

.kb-form-group input:focus,
.kb-form-group textarea:focus {
  border-color: var(--primary);
  background: #fff
}

.kb-form-group textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.6
}

/* Completion Photo Upload */
.cp-upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--gray-50)
}

.cp-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-bg)
}

.cp-upload-area i {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 8px
}

.cp-upload-area p {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin: 0
}

.cp-upload-area .cp-upload-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-400);
  margin-top: 4px
}

.ic-photo {
  background: #e0f2fe !important;
  color: #0369a1 !important
}

/* ─── Tickets & Verify Pages ─── */
#auth-verify {
  padding: 0 clamp(24px, 3vw, 40px) 1px !important;
  margin-top: 0 !important
}

#auth-tickets .filters-bar,#auth-verify .filters-bar {
  flex-wrap: nowrap
}


#auth-tickets .filters-bar .search-box,#auth-verify .filters-bar .search-box {
  flex: 1 1 500px
}

/* Collapsible filter extras (desktop: visible inline) */
#auth-tickets .fb-row,#auth-verify .fb-row {
  display: contents
}

.fb-toggle {
  display: none
}

.fb-extras {
  display: contents
}

.fb-dates,
.fb-actions {
  display: contents
}

@media(max-width:768px) {
  .fb-toggle {
    display: flex
  }

  .fb-extras {
    display: none
  }

  .fb-extras.open {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%
  }

  .fb-row {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: center
  }

  .fb-row select {
    flex: 1;
    min-width: 0
  }

  .fb-toggle {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: #fff;
    color: var(--gray-500);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all .15s
  }

  .fb-toggle:active {
    background: var(--gray-100)
  }

  .fb-toggle.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg)
  }

  .fb-dates {
    display: flex;
    gap: 8px;
    width: 100%
  }

  .fb-dates input {
    flex: 1;
    min-width: 0
  }

  .fb-actions {
    display: flex;
    gap: 8px;
    width: 100%
  }

  .fb-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 42px
  }
}

/* Ticket cards (mobile) */
.ticket-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin: 0 16px 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s
}

.ticket-card:active {
  transform: scale(.98)
}

.ticket-card .tc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px
}

.ticket-card .tc-id {
  font-size: 13px;
  color: var(--gray-600)
}

.ticket-card .tc-subject {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.ticket-card .tc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 10px
}

.ticket-card .tc-meta i {
  width: 14px;
  text-align: center
}

.ticket-card .tc-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100)
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-400)
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 16px
}

.empty-state h4 {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 8px
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100
}

.sidebar-brand {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-weight: 700;
  width: 100%
}

.sidebar-brand i {
  font-size: 80px;
  color: var(--primary-light);
  display: block;
  width: 100%;
  text-align: center
}

.sidebar-brand span {
  font-size: 18px
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto
}

.sidebar-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--gray-400);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent
}

.sidebar-nav .nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05)
}

.sidebar-nav .nav-item.active {
  color: #fff;
  background: rgba(37, 99, 235, .2);
  border-left-color: var(--primary)
}

.sidebar-nav .nav-item i {
  width: 20px;
  text-align: center;
  font-size: 16px
}

.sidebar-nav .nav-section {
  padding: 8px 24px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: color .2s;
  display: flex;
  align-items: center
}

.sidebar-nav .nav-section:hover {
  color: var(--gray-200)
}

.sidebar-nav .nav-group {
  margin-bottom: 2px
}

.sidebar-nav .nav-items {
  overflow: hidden;
  max-height: 0;
  transition: max-height .3s ease
}

.sidebar-nav .nav-items.open {
  max-height: 600px
}

.nav-chevron {
  font-size: 9px;
  margin-right: 8px;
  transition: transform .25s ease;
  flex-shrink: 0
}

.sidebar-nav .nav-section.active .nav-chevron {
  transform: rotate(90deg)
}

.sidebar-footer { display: none }

.sidebar-footer .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0
}

.sidebar-footer .user-info {
  flex: 1;
  min-width: 0
}

.sidebar-footer .user-info .name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.sidebar-footer .user-info .role {
  font-size: 12px;
  color: var(--gray-400)
}

.sidebar-footer .user-info .dept {
  font-size: 11px;
  color: var(--gray-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.sidebar-footer .logout-btn {
  color: var(--gray-400);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: var(--transition)
}

.sidebar-footer .logout-btn:hover {
  color: var(--danger)
}

/* ─── Main Content ─── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column
}

.page-header {
  background: #fff;
  padding: 12px clamp(16px, 2vw, 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 50
}

.page-header h2 {
  font-size: 20px;
  color: var(--gray-900)
}

#auth-users,
#auth-categories,
#auth-institutions,
#auth-location-types,
#auth-locations,
#auth-nature-work,
#auth-room-numbers {
  padding-bottom: 0 !important;
}

.page-content {
  padding: clamp(12px, 1.5vw, 24px) clamp(32px, 4vw, 64px) 24px;
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto
}

.page {
  display: none;
  width: 100%
}

.page.active {
  display: block !important;
  width: 100%
}

/* ─── Loading Overlay ─── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 3000;
  align-items: center;
  justify-content: center
}

.loading-overlay.active {
  display: flex
}

.loading-spinner {
  background: #fff;
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3)
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px
}

.loading-spinner p {
  font-size: 15px;
  color: var(--gray-600);
  font-weight: 500
}

.loading-bar-track {
  width: 180px;
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  margin: 12px auto 0;
  overflow: hidden
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width .3s
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  gap: 8px
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  animation: slideIn .3s ease;
  color: #fff
}

.toast-success {
  background: var(--success)
}

.toast-error {
  background: var(--danger)
}

.toast-info {
  background: var(--primary)
}

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px 0 60px;
  flex-wrap: wrap
}

.pagination-wrap .page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
  padding: 0 10px
}

.pagination-wrap .page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg)
}

.pagination-wrap .page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary)
}

.pagination-wrap .page-btn:disabled {
  opacity: .4;
  cursor: default
}

.pagination-wrap .page-info {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 8px
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0
  }

  to {
    transform: translateX(0);
    opacity: 1
  }
}

/* ─── Footer ─── */
.app-footer {
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  z-index: 20;
  text-align: center;
  padding: 14px 32px;
  font-size: 13px;
  color: var(--gray-400);
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200)
}

.public-footer {
  text-align: center;
  padding: 24px clamp(16px, 4vw, 48px);
  font-size: 13px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200)
}

.public-footer strong {
  color: var(--gray-600)
}

/* ─── Track Ticket ─── */
.track-wrap {
  max-width: 640px;
  margin: 0 auto
}

.track-search-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 24px rgba(0, 0, 0, .04);
  text-align: center;
  margin-bottom: 24px
}

.track-search-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px
}

.track-search-card h2 i {
  color: var(--primary);
  font-size: 24px
}

.track-search-card p {
  color: var(--gray-500);
  font-size: 14px;
  margin: 0 0 24px
}

.track-input-group {
  display: flex;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06)
}

.track-input-group input {
  flex: 1;
  border: 2px solid var(--gray-200);
  border-right: none;
  padding: 14px 18px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  border-radius: 12px 0 0 12px;
  background: var(--gray-50);
  font-family: inherit
}

.track-input-group input:focus {
  border-color: var(--primary);
  background: #fff
}

.track-input-group button {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0 12px 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .2s;
  font-family: inherit
}

.track-input-group button:hover {
  background: var(--primary-dark, #1d4ed8)
}

.track-result {
  margin-top: 24px;
  animation: fadeUp .4s ease
}

.track-result-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 24px rgba(0, 0, 0, .04);
  overflow: hidden
}

.track-result-header {
  background: linear-gradient(135deg, var(--primary), #1e40af);
  padding: 24px 28px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.track-result-header .trh-id {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px
}

.track-result-header .trh-status {
  background: rgba(255, 255, 255, .2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(4px)
}

.track-result-body {
  padding: 28px
}

.track-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 4px;
  position: relative
}

.track-status-bar::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 28px;
  right: 28px;
  height: 3px;
  background: var(--gray-200);
  border-radius: 2px;
  z-index: 0
}

.track-status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
  flex: 1
}

.track-status-step .tss-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: var(--gray-200);
  color: var(--gray-400);
  transition: all .3s
}

.track-status-step.active .tss-dot {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, .35)
}

.track-status-step.completed .tss-dot {
  background: #16a34a;
  color: #fff
}

.track-status-step .tss-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-align: center;
  white-space: nowrap;
  transition: color .3s
}

.track-status-step .tss-desc {
  font-size: 10px;
  color: var(--gray-400);
  text-align: center;
  white-space: nowrap;
  transition: color .3s;
  margin-top: -2px
}

.track-status-step.active .tss-label {
  color: var(--primary)
}

.track-status-step.completed .tss-label {
  color: #16a34a
}

.track-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.track-detail-item {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px
}

.track-detail-item.full {
  grid-column: 1/-1
}

.track-detail-item .tdi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: .4px
}

.track-detail-item .tdi-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800)
}

.track-error {
  text-align: center;
  padding: 40px 20px
}

.track-error i {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: .6;
  color: var(--danger)
}

.track-error p {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: var(--gray-600)
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ─── Auth Layout toggle ─── */
.auth-layout {
  display: none
}

.auth-layout.active {
  display: flex;
  flex-direction: column;
  min-height: 100vh
}

/* ─── Mobile Bottom Nav ─── */
.mobile-bottom-nav {
  display: none
}

.mobile-account-menu {
  display: none
}

@media(max-width:768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  height: 80px;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    z-index: 200;
    justify-content: space-around;
    align-items: center;
    padding: 4px 0 env(safe-area-inset-bottom, 4px)
  }

  .mb-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 10px;
    transition: color .15s;
    min-width: 0;
    -webkit-tap-highlight-color: transparent
  }

  .mb-nav-item i {
    font-size: 20px;
    transition: color .15s
  }

  .mb-nav-item span {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap
  }

  .mb-nav-item.active {
    color: var(--primary)
  }

  .mb-nav-item.active i {
    color: var(--primary)
  }

  .mobile-account-menu {
    position: fixed;
    bottom: 80px;
    right: 16px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
    z-index: 210;
    min-width: 200px;
    overflow: hidden;
    display: none;
    flex-direction: column
  }

  .mobile-account-menu.active {
    display: flex
  }

  .mobile-account-menu .mam-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: 2px
  }

  .mobile-account-menu .mam-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900)
  }

  .mobile-account-menu .mam-role {
    font-size: 12px;
    color: var(--gray-500)
  }

  .mobile-account-menu .mam-item {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s
  }

  .mobile-account-menu .mam-item:hover {
    background: var(--gray-50)
  }

  .mobile-account-menu .mam-item i {
    width: 18px;
    text-align: center;
    color: var(--gray-400)
  }

  .sidebar {
    display: none
  }

  .sidebar-overlay {
    display: none !important
  }

  .main-content {
    margin-left: 0;
    padding-bottom: calc(64px + 52px)
  }

  .mobile-toggle {
    display: none !important
  }

  .page-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-200)
  }

  .page-content {
    padding: 12px 16px 24px
  }

  .auth-layout.active {
    flex-direction: column
  }

  .auth-layout.active .main-content {
    flex: 1
  }

  #auth-dashboard.active {
    display: none
  }

  #auth-dashboard-mobile.active {
    display: block
  }

  .ticket-detail-grid {
    grid-template-columns: 1fr
  }

  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px
  }

  .dash-stat-card .ds-number {
    font-size: 24px
  }

  .dash-stat-card .ds-icon-wrap {
    width: 38px;
    height: 38px;
    font-size: 15px;
    border-radius: 10px
  }

  .dash-charts {
    grid-template-columns: 1fr;
    gap: 16px
  }

  .dash-welcome {
    font-size: 18px;
    margin-bottom: 16px
  }

  .quick-cards {
    grid-template-columns: 1fr
  }

  .app-footer {
    position: fixed;
    bottom: 64px;
    left: 0;
    right: 0;
    padding: 10px 16px;
    font-size: 12px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50)
  }

  /* Unified table pages on mobile */
  .auth-tables .card {
    border-radius: 0;
    box-shadow: none;
    border: none;
    background: transparent
  }

  .auth-tables .card .table-container {
    padding: 0
  }

  .auth-tables .filters-bar {
    padding-left: 16px;
    padding-right: 16px;
    gap: 8px;
    flex-wrap: wrap
  }

  .auth-tables .filters-bar .search-box {
    flex: 1 1 100%;
    min-width: 0
  }

  .auth-tables .filters-bar select {
    flex: 1;
    min-width: 0
  }
}

@media(min-width:769px) {
  #auth-dashboard-mobile {
    display: none
  }

  .mobile-bottom-nav {
    display: none !important
  }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--gray-700);
  cursor: pointer;
  padding: 4px
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  z-index: 99
}

.sidebar-overlay.active {
  display: block
}

@media(min-width:769px) {
  .sidebar-overlay {
    display: none !important
  }
}

/* ─── KB Article Detail Modal ─── */
.kb-content {
  line-height: 1.8;
  font-size: 15px;
  color: var(--gray-700);
  white-space: pre-wrap
}

/* Public content wrapper */
.public-content {
  padding: clamp(24px, 4vw, 40px) clamp(16px, 5vw, 64px)
}

.page-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px
}

.page-card h2 {
  font-size: 24px;
  margin-bottom: 8px
}

.page-card .subtitle {
  color: var(--gray-500);
  margin-bottom: 24px;
  font-size: 15px
}

/* Popup display overrides */
#popupDisplayOverlay .modal {
  text-align: center
}

#popupDisplayOverlay .modal-header {
  justify-content: center;
  position: relative
}

#popupDisplayOverlay .modal-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%)
}

/* ─── Card Grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px
}

@media(max-width:768px) {
  .card-grid {
    grid-template-columns: 1fr
  }
}

/* ─── Dashboard Charts ─── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px
}

.chart-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  padding: 16px;
  margin-bottom: 0
}

.chart-card h4 {
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px
}

.chart-bar-group {
  margin-bottom: clamp(10px, 1vw, 14px)
}

.chart-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: clamp(12px, 0.8vw, 13px);
  margin-bottom: clamp(3px, 0.3vw, 4px)
}

.chart-bar-label span:first-child {
  color: var(--gray-600);
  font-weight: 500
}

.chart-bar-label span:last-child {
  font-weight: 700
}

.chart-bar-track {
  height: clamp(6px, 0.5vw, 8px);
  background: var(--gray-100);
  border-radius: clamp(3px, 0.25vw, 4px);
  overflow: hidden
}

.chart-bar-fill {
  height: 100%;
  border-radius: clamp(3px, 0.25vw, 4px);
  transition: width .6s ease
}

.chart-priority-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(80px, 7vw, 100px), 1fr));
  gap: clamp(8px, 0.8vw, 12px);
  margin-top: 4px
}

.chart-priority-item {
  text-align: center;
  padding: clamp(10px, 1vw, 16px) clamp(6px, 0.5vw, 8px);
  border-radius: clamp(8px, 0.6vw, 10px);
  background: var(--gray-50);
  transition: transform .2s, box-shadow .2s
}

.chart-priority-item:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08)
}

.chart-priority-item .p-value {
  font-size: clamp(18px, 1.5vw, 24px);
  font-weight: 700
}

.chart-priority-item .p-label {
  font-size: clamp(11px, 0.7vw, 12px);
  color: var(--gray-500);
  margin-top: clamp(2px, 0.2vw, 4px)
}

.text-muted {
  color: var(--gray-500)
}

.text-center {
  text-align: center
}

.mb-16 {
  margin-bottom: 16px
}

.mt-16 {
  margin-top: 16px
}

.d-flex {
  display: flex
}

.align-center {
  align-items: center
}

.gap-8 {
  gap: 8px
}

.gap-12 {
  gap: 12px
}

.flex-1 {
  flex: 1
}

.fw-600 {
  font-weight: 600
}

/* ─── Enhanced Ticket Detail (Professionally Redesigned) ─── */
.td-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px
}

.td-id-area {
  display: flex;
  align-items: center;
  gap: 16px
}

.td-id-area h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -.3px;
  font-family: var(--font-mono, monospace)
}

.td-id-copy {
  background: none;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
  border-radius: 6px;
  transition: all .2s
}

.td-id-copy:hover {
  color: var(--primary);
  background: var(--primary-bg)
}

.td-badge-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.td-actions-top {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.ticket-detail-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 28px;
  padding-bottom: 80px
}

.td-main-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow .25s
}

.td-main-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04)
}

.td-main-card .td-card-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%)
}

.td-main-card .td-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .3px
}

.td-main-card .td-card-header h3 i {
  font-size: 16px
}

.td-main-card .td-card-body {
  padding: 28px
}

.td-subject {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  line-height: 1.35
}

.td-description {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.75;
  white-space: pre-wrap;
  padding: 20px;
  background: var(--gray-50);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  font-family: var(--font-mono, inherit)
}

.td-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.td-meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: 10px;
  transition: background .2s
}

.td-meta-item:hover {
  background: var(--gray-100)
}

.td-meta-item .td-meta-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0
}

.td-meta-item .td-meta-icon.ic-category {
  background: #6366f1
}

.td-meta-item .td-meta-icon.ic-creator {
  background: #8b5cf6
}

.td-meta-item .td-meta-icon.ic-email {
  background: #3b82f6
}

.td-meta-item .td-meta-icon.ic-assign {
  background: #10b981
}

.td-meta-item .td-meta-icon.ic-created {
  background: #f59e0b
}

.td-meta-item .td-meta-icon.ic-updated {
  background: #6b7280
}

.td-meta-item .td-meta-icon.ic-phone {
  background: #10b981
}

.td-meta-item .td-meta-icon.ic-location {
  background: #8b5cf6
}

.td-meta-item .td-meta-icon.ic-briefcase {
  background: #f59e0b
}

.td-meta-item .td-meta-icon.ic-attach {
  background: #6366f1
}

.td-meta-item .td-meta-icon.ic-gear {
  background: #ec4899
}

.td-meta-item .td-meta-icon.ic-photo {
  background: #e0f2fe;
  color: #0369a1
}

.td-meta-item .td-meta-content {
  flex: 1;
  min-width: 0
}

.td-meta-item .td-meta-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 2px
}

.td-meta-item .td-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  word-break: break-word
}

.td-comment-input {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200)
}

.td-comment-input input {
  flex: 1
}

.td-action-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  overflow: hidden;
  margin-bottom: 24px;
  transition: box-shadow .25s
}

.td-action-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04)
}

.td-action-card .td-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%)
}

.td-action-card .td-card-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .4px
}

.td-action-card .td-action-body {
  padding: 20px
}

/* Timeline card container */
.td-timeline-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  overflow: hidden;
  margin-bottom: 28px;
  transition: box-shadow .25s
}

.td-timeline-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .04)
}

.td-timeline-card .td-card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%)
}

.td-timeline-card .td-card-header h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: .4px
}

.td-timeline-card .td-card-body {
  padding: 24px 32px
}

/* ─── Horizontal Timeline ─── */
.td-status-timeline {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%
}

.td-status-timeline li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative
}

.td-status-timeline li::before {
  content: '';
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--gray-200);
  top: 14px;
  left: -50%;
  z-index: 0;
  transition: background .3s
}

.td-status-timeline li:first-child::before {
  display: none
}

.td-status-timeline li.td-step-done::before {
  background: var(--primary)
}

.td-status-timeline .td-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px #fff;
  transition: all .3s
}

.td-status-timeline .td-dot.td-dot-done {
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(37, 99, 235, .1)
}

.td-status-timeline .td-dot-info {
  background: var(--info)
}

.td-status-timeline .td-dot-primary {
  background: var(--primary)
}

.td-status-timeline .td-dot-warning {
  background: var(--warning)
}

.td-status-timeline .td-dot-success {
  background: var(--success)
}

.td-status-timeline .td-dot-muted {
  background: var(--gray-300)
}

.td-status-timeline .td-dot-muted i {
  color: var(--gray-500)
}

.td-status-timeline .td-step-content {
  margin-top: 12px;
  z-index: 1;
  background: #fff;
  padding: 0 8px
}

.td-status-timeline .td-step-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-800)
}

.td-status-timeline .td-step-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px
}

.td-comment-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 14px;
  transition: background .2s
}

.td-comment-item:last-child {
  border-bottom: none
}

.td-comment-item:hover {
  background: var(--gray-50)
}

.td-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  position: relative
}

.td-comment-avatar {
  background: linear-gradient(135deg, var(--primary), #6366f1)
}

.td-comment-avatar[data-color="0"] {
  background: linear-gradient(135deg, #6366f1, #8b5cf6)
}

.td-comment-avatar[data-color="1"] {
  background: linear-gradient(135deg, #3b82f6, #60a5fa)
}

.td-comment-avatar[data-color="2"] {
  background: linear-gradient(135deg, #10b981, #34d399)
}

.td-comment-avatar[data-color="3"] {
  background: linear-gradient(135deg, #f59e0b, #fbbf24)
}

.td-comment-avatar[data-color="4"] {
  background: linear-gradient(135deg, #ef4444, #f87171)
}

.td-comment-avatar[data-color="5"] {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa)
}

.td-comment-content {
  flex: 1;
  min-width: 0
}

.td-comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px
}

.td-comment-author {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-800)
}

.td-comment-date {
  font-size: 12px;
  color: var(--gray-400)
}

.td-comment-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.6
}

.td-card-divider {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 16px 0
}

@media(max-width:768px) {
  .td-header {
    flex-direction: column;
    align-items: flex-start
  }

  .td-id-area h2 {
    font-size: 20px
  }

  .ticket-detail-grid {
    grid-template-columns: 1fr;
    gap: 16px
  }

  .td-meta-grid {
    grid-template-columns: 1fr
  }

  .td-main-card .td-card-header,
  .td-main-card .td-card-body {
    padding: 16px 18px
  }

  .td-subject {
    font-size: 18px
  }

  .td-description {
    padding: 14px;
    font-size: 14px
  }

  .td-action-card .td-card-header {
    padding: 14px 16px
  }

  .td-action-card .td-action-body {
    padding: 14px 16px
  }

  .td-timeline-card .td-card-body {
    padding: 16px
  }

  .td-comment-item {
    padding: 12px 16px
  }

  .td-comment-avatar {
    width: 34px;
    height: 34px;
    font-size: 13px
  }

  .td-comment-input {
    padding: 12px 16px
  }

  .td-comment-header {
    flex-wrap: wrap;
    gap: 4px
  }

  .td-comment-date {
    width: 100%
  }
}

/* Ticket detail status badges variant */
.td-badge-lg {
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 14px
}

/* ─── Profile Page ─── */
.profile-page {
  max-width: 960px;
  margin: 0 auto
}

.profile-header {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a5f, #2d6a9f);
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .1)
}

.profile-cover {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
  cursor: pointer;
  background: linear-gradient(135deg, #1e3a5f, #2d6a9f)
}

.profile-cover-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background .2s
}

.profile-cover-overlay:hover {
  background: rgba(0, 0, 0, .7)
}

.profile-header-content {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 0 24px 24px;
  margin-top: -60px
}

.profile-header-info {
  flex: 1;
  padding-top: 60px
}

.profile-header-info h1 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px
}

.profile-header-info p {
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  margin: 2px 0
}

.profile-member-since {
  font-size: 12px;
  color: rgba(255, 255, 255, .5)
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px
}

@media(max-width:768px) {
  .profile-grid {
    grid-template-columns: 1fr
  }
}

.profile-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  overflow: hidden;
  margin-bottom: 20px
}

.profile-card-header {
  padding: 14px 20px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800)
}

.profile-card-header i {
  margin-right: 8px;
  color: var(--primary)
}

.profile-card-body {
  padding: 20px
}

.profile-field {
  margin-bottom: 18px
}

.profile-field:last-child {
  margin-bottom: 0
}

.profile-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 4px
}

.profile-field .form-control {
  width: 100%
}

.field-hint {
  display: block;
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 2px
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  display: none;
  margin-bottom: 12px
}

.profile-avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  cursor: pointer
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1e40af);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(37, 99, 235, .25);
  transition: opacity .2s;
  overflow: hidden;
  border: 4px solid #fff
}

.profile-avatar-overlay {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  transition: transform .2s;
  cursor: pointer
}

.profile-avatar-overlay:hover {
  transform: scale(1.1)
}

.sidebar-profile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity .2s;
  border-radius: 8px
}

.sidebar-profile-link:hover {
  opacity: .8
}

/* ═══════════════════════════════════════════════════════════
   MOBILE ANDROID APP UI/UX
   Touch-friendly, full-width, bottom-sheet modals
   ═══════════════════════════════════════════════════════════ */
@media(max-width:768px) {

  /* ─── Prevent horizontal scroll ─── */
  body {
    overflow-x: hidden !important
  }

  #publicLayout,
  .public-content,
  .page-content,
  .main-content {
    overflow-x: hidden !important;
    max-width: 100vw !important
  }

  /* ─── Touch-friendly tap targets ─── */
  .btn,
  .form-control,
  .ts-input,
  .ts-select,
  select.form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="date"],
  input[type="number"],
  input[type="search"],
  textarea,
  button {
    font-size: 16px !important
  }

  .btn {
    padding: 14px 20px;
    min-height: 48px
  }

  .btn-sm {
    padding: 10px 14px;
    min-height: 42px
  }

  .ts-input,
  .ts-select {
    padding: 13px 14px !important;
    min-height: 48px
  }

  .ts-input-wrap .ts-input {
    padding-left: 40px !important
  }

  .ts-input-icon {
    font-size: 15px !important
  }

  /* ─── Modal → bottom sheet ─── */
  .modal-overlay.active {
    align-items: flex-end;
    padding: 0
  }

  .modal {
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
    max-width: 100%;
    margin-top: auto;
    animation: modalSlideUp .3s ease
  }

  .modal-header {
    padding: 16px 20px;
    border-radius: 16px 16px 0 0
  }

  .modal-body {
    padding: 20px
  }

  .modal-footer {
    padding: 14px 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 8px));
    flex-wrap: wrap
  }

  .modal-footer .btn {
    flex: 1;
    min-width: 0
  }

  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px
  }

  @keyframes modalSlideUp {
    from {
      transform: translateY(100%)
    }

    to {
      transform: translateY(0)
    }
  }

  #popupDisplayOverlay .modal {
    border-radius: 16px;
    max-height: 90vh;
    margin: 20px;
    max-width: 100%;
    animation: modalFadeIn .3s ease
  }

  @keyframes modalFadeIn {
    from {
      opacity: 0;
      transform: scale(.95)
    }

    to {
      opacity: 1;
      transform: scale(1)
    }
  }

  /* ─── Table horizontal scroll ─── */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch
  }

  .table-container table {
    min-width: 700px
  }

  .auth-tables .card .table-container {
    padding: 0;
    overflow-x: auto
  }

  /* ─── Toast center-top ─── */
  .toast-container {
    top: auto;
    bottom: calc(76px + env(safe-area-inset-bottom, 8px));
    left: 12px;
    right: 12px;
    gap: 6px
  }

  .toast {
    min-width: 0;
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 12px;
    animation: toastSlideUp .3s ease
  }

  @keyframes toastSlideUp {
    from {
      transform: translateY(20px);
      opacity: 0
    }

    to {
      transform: translateY(0);
      opacity: 1
    }
  }

  /* ─── Loading overlay ─── */
  .loading-spinner {
    padding: 32px 28px;
    border-radius: 14px;
    margin: 0 24px
  }

  .loading-spinner p {
    font-size: 14px
  }

  .spinner-ring {
    width: 40px;
    height: 40px;
    border-width: 3px
  }

  .loading-bar-track {
    width: 140px
  }

  /* ─── Filters bar ─── */
  .auth-tables .filters-bar {
    gap: 8px;
    padding: 12px 16px
  }

  .auth-tables .filters-bar .search-box {
    flex: 1 1 100% !important;
    min-width: 0
  }

  .auth-tables .filters-bar select {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    font-size: 14px !important;
    padding: 10px 8px !important
  }

  .auth-tables .filters-bar .form-control[type="date"] {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    font-size: 14px !important;
    padding: 10px 8px !important
  }

  .auth-tables .filters-bar .btn {
    flex: 1 1 100%;
    min-height: 42px
  }

  .fb-toggle {
    display: flex;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: #fff;
    color: var(--gray-500);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all .15s
  }

  .fb-toggle:active {
    background: var(--gray-100)
  }

  .fb-toggle.active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg)
  }

  .fb-row {
    display: flex;
    gap: 8px;
    width: 100%;
    align-items: center
  }

  .auth-tables .filters-bar .fb-row select {
    flex: 1;
    min-width: 0;
    flex-basis: auto !important
  }

  .fb-extras {
    display: none;
    flex-direction: column;
    gap: 8px;
    width: 100%
  }

  .fb-extras.open {
    display: flex
  }

  .fb-dates {
    display: flex;
    gap: 8px;
    width: 100%
  }

  .fb-dates input {
    flex: 1;
    min-width: 0
  }

  .fb-actions {
    display: flex;
    gap: 8px;
    width: 100%
  }

  .fb-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 42px
  }

  /* ─── Hide table header on mobile (cards replace rows) ─── */
  #auth-tickets table,#auth-verify table {
    display: block !important;
    width: 100% !important
  }

  #auth-tickets table thead,#auth-verify table thead {
    display: none !important
  }

  #auth-tickets table tbody,#authTicketsBody,
  #auth-verify table tbody,#verifyTicketsBody {
    display: block !important;
    width: 100% !important
  }

  #auth-tickets .card,#auth-verify .card {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important
  }

  #auth-tickets .card .card-body,#auth-verify .card .card-body {
    padding: 0 !important
  }

  #auth-tickets .card .table-container,#auth-verify .card .table-container {
    padding: 0 !important;
    overflow: visible !important
  }

  #auth-tickets .card .table-container table,#auth-verify .card .table-container table {
    min-width: 0 !important;
    display: block !important
  }

  #auth-tickets .table-container,#auth-verify .table-container {
    overflow: visible !important
  }

  #authTicketsBody,#verifyTicketsBody {
    padding: 0 16px 16px !important
  }

  /* ─── Ticket cards (mobile) ─── */
  .ticket-card {
    margin: 0 0 12px !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07) !important;
    position: relative !important;
    border-left: 4px solid var(--gray-300) !important
  }

  .ticket-card:active {
    transform: scale(.98) !important
  }

  .ticket-card.tc-priority-low {
    border-left-color: #3b82f6 !important
  }

  .ticket-card.tc-priority-medium {
    border-left-color: #eab308 !important
  }

  .ticket-card.tc-priority-high {
    border-left-color: #f97316 !important
  }

  .ticket-card.tc-priority-critical {
    border-left-color: #ef4444 !important
  }

  .ticket-card .tc-top {
    display: flex;
    align-items: center;
    gap: 8px !important;
    margin-bottom: 8px !important
  }

  .ticket-card .tc-id {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--gray-700) !important;
    flex-shrink: 0
  }

  .ticket-card .tc-badges {
    display: flex;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0
  }

  .ticket-card .tc-subject {
    font-size: 15px !important;
    font-weight: 600;
    margin-bottom: 10px !important;
    color: var(--gray-900) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
  }

  .ticket-card .tc-meta {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 5px !important;
    font-size: 12px !important;
    margin-bottom: 0 !important
  }

  .ticket-card .tc-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--gray-50);
    padding: 3px 8px;
    border-radius: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--gray-600)
  }

  .ticket-card .tc-meta span:last-child:nth-child(odd) {
    grid-column: 1/-1
  }

  .ticket-card .tc-meta i {
    width: 13px;
    text-align: center;
    flex-shrink: 0;
    font-size: 11px;
    color: var(--gray-400)
  }

  .ticket-card .tc-actions {
    display: flex;
    gap: 8px !important;
    padding-top: 10px !important;
    margin-top: 10px !important;
    border-top: 1px solid var(--gray-100) !important
  }

  .ticket-card .tc-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 40px;
    font-size: 13px !important;
    border-radius: 8px !important
  }

  /* ─── Public nav mobile ─── */
  .public-nav {
    height: 72px;
    padding: 0 14px
  }

  .public-nav .brand {
    font-size: 18px;
    gap: 10px
  }

  .public-nav .brand i {
    font-size: 30px
  }

  .public-nav .brand img {
    height: 38px
  }

  .public-nav .brand > :first-child {
    padding-right: 14px;
    border-right-width: 1.5px
  }

  .public-nav .nav-links {
    display: none
  }

  .public-nav .login-btn {
    display: none
  }

  .nav-toggle {
    display: flex;
    font-size: 24px;
    padding: 8px
  }

  .nav-overlay.active {
    display: block
  }

  .nav-links.open {
    display: flex
  }

  /* ─── Hero ─── */
  .hero {
    padding: clamp(32px, 7vw, 60px) 20px
  }

  .hero h1 {
    font-size: clamp(24px, 6vw, 32px)
  }

  .hero p {
    font-size: 15px
  }

  .hero-actions a {
    padding: 12px 20px;
    font-size: 14px;
    flex: 1 1 100%
  }

  /* ─── Quick cards ─── */
  .quick-cards {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px
  }

  .quick-card {
    padding: 28px 20px
  }

  /* ─── Public content ─── */
  .public-content {
    padding: 16px
  }

  /* ─── Track ticket / vertical timeline ─── */
  .track-search-card {
    padding: 20px 16px
  }

  .track-input-group {
    flex-direction: column;
    gap: 10px;
    box-shadow: none;
    max-width: 100%
  }

  .track-input-group input {
    border-radius: 12px !important;
    border-right: 2px solid var(--gray-200) !important;
    padding: 14px 16px !important;
    font-size: 16px !important
  }

  .track-input-group button {
    border-radius: 12px !important;
    justify-content: center;
    padding: 14px !important;
    font-size: 16px !important
  }

  .track-status-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    margin-bottom: 20px !important
  }

  .track-status-bar::before {
    display: none !important
  }

  .track-status-step {
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    position: relative;
    flex: none !important
  }

  .track-status-step::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: -12px;
    width: 2px;
    background: var(--gray-200);
    z-index: 0
  }

  .track-status-step:last-child::before {
    display: none
  }

  .track-status-step.completed::before {
    background: #16a34a
  }

  .track-status-step.active::before {
    background: var(--primary)
  }

  .track-status-step .tss-dot {
    width: 36px !important;
    height: 36px !important;
    font-size: 12px !important;
    flex-shrink: 0;
    z-index: 1
  }

  .track-status-step .tss-label {
    font-size: 14px !important;
    white-space: normal !important;
    text-align: left !important;
    color: var(--gray-700) !important
  }

  .track-status-step .tss-desc {
    font-size: 12px !important;
    white-space: normal !important;
    text-align: left !important;
    width: 100%
  }

  .track-status-step.active .tss-label {
    color: var(--primary) !important
  }

  .track-status-step.completed .tss-label {
    color: #16a34a !important
  }

  .track-result-card .track-result-header {
    padding: 16px 20px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start
  }

  .track-result-header .trh-id {
    font-size: 16px
  }

  .track-result-body {
    padding: 16px 20px
  }

  .track-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 10px
  }

  /* ─── Knowledge base ─── */
  .kb-header-card {
    padding: 24px 16px
  }

  .kb-search-wrap input {
    font-size: 14px !important;
    padding: 12px 14px 12px 38px !important
  }

  .kb-card {
    padding: 16px;
    min-height: auto
  }

  .kb-card .kb-title {
    font-size: 15px
  }

  /* ─── Login page ─── */
  .login-page {
    min-height: calc(100vh - 56px);
    padding: 24px 20px
  }

  .login-right .login-form-wrap h2 {
    font-size: 22px
  }

  .login-right .login-form-wrap .login-sub {
    font-size: 13px
  }

  /* ─── Dashboard stats ─── */
  .stats-grid {
    gap: 8px
  }

  .dash-stat-card {
    padding: 14px
  }

  .dash-stat-card .ds-number {
    font-size: 22px
  }

  .dash-stat-card .ds-label {
    font-size: 11px
  }

  /* ─── Assign modal ─── */
  .modal-user {
    max-width: 100%
  }

  /* ─── Profile page ─── */
  .profile-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 16px 20px;
    margin-top: -40px
  }

  .profile-header-info {
    padding-top: 0
  }

  .profile-header-info h1 {
    font-size: 20px
  }

  .profile-avatar-wrap {
    width: 80px;
    height: 80px
  }

  .profile-avatar {
    width: 80px;
  height: 112px;
    font-size: 32px
  }

  /* ─── Verify page ─── */
  .verify-card {
    padding: 5px;
    margin-bottom: 18px
  }

  .verify-meta {
    font-size: 12px;
    gap: 8px;
    flex-wrap: wrap
  }

  .verify-actions {
    gap: 8px;
    flex-wrap: wrap
  }

  .verify-actions .btn {
    flex: 1;
    min-width: 0
  }

  /* ─── Page header ─── */
  .page-header {
    padding: 12px 16px
  }

  .page-header h2 {
    font-size: 18px
  }

  .page-content {
    padding: 12px 14px 24px
  }

  /* ─── Pagination ─── */
  .pagination-wrap {
    gap: 4px;
    padding: 16px 0 8px
  }

  .pagination-wrap .page-btn {
    min-width: 40px;
    height: 40px;
    font-size: 14px
  }


  /* ─── Mobile dashboard ─── */
  .m-dash-stats {
    gap: 8px
  }

  .m-stat-card .ms-number {
    font-size: 18px
  }

  .m-stat-card .ms-body {
    padding: 10px 12px
  }

  .m-chart-card {
    padding: 14px
  }
}

.dept-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff
}

.dept-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--gray-700);
  cursor: pointer;
  padding: 4px 0
}

.dept-checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary)
}

/* Hide old simple footer on home page */
#pub-home ~ .public-footer { display: none }

/* ─── Landing Page Responsive ─── */
@media(max-width:1024px) {
  .lp-about-grid { grid-template-columns: 1fr; gap: 20px }
  .lp-services-grid { grid-template-columns: 1fr; gap: 20px }
  .lp-message-card { grid-template-columns: 1fr; gap: 32px }
  .lp-contact-grid { grid-template-columns: 1fr; gap: 20px }
  .lp-contact-card.featured { transform: none }
  .lp-contact-card.featured:hover { transform: translateY(-3px) }
}

@media(max-width:768px) {
  .lp-topbar { display: none }
  .lp-hero { min-height: 80vh }
  .lp-hero-content h1 { font-size: clamp(26px, 7vw, 40px) }
  .lp-hero-stats { flex-direction: column; gap: 16px; padding: 20px 24px }
  .lp-stat-divider { width: 100%; height: 1px }
  .lp-hero-actions { flex-direction: column; align-items: center }
  .lp-btn-primary, .lp-btn-outline { width: 100%; max-width: 280px; justify-content: center }
  .lp-about-grid { grid-template-columns: 1fr }
  .lp-services-grid { grid-template-columns: 1fr }
  .lp-message-card { padding: 24px }
  .lp-message-values { grid-template-columns: 1fr 1fr; gap: 12px }
  .lp-value-item { padding: 18px }
  .lp-value-num { font-size: 22px }
  .lp-contact-grid { grid-template-columns: 1fr }
  .lp-footer-top { flex-direction: column; gap: 16px; text-align: center }
  .lp-footer-links { flex-wrap: wrap; justify-content: center }
  .lp-footer-bottom { flex-direction: column; gap: 8px; text-align: center }
}

@media(max-width:480px) {
  .lp-hero { min-height: 75vh }
  .lp-hero-sub { font-size: 14px }
  .lp-hero-stats { padding: 16px 20px }
  .lp-stat-icon { width: 36px; height: 36px; font-size: 15px }
  .lp-stat-num { font-size: 18px }
  .lp-about-card { padding: 28px 20px }
  .lp-service-body { padding: 24px 20px }
  .lp-message-values { grid-template-columns: 1fr 1fr }
}

.clickable { cursor: pointer }