:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-dark: #0f172a;
  --surface-dark-2: #111827;

  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;

  --success: #16a34a;
  --success-bg: #dcfce7;
  --success-line: #bbf7d0;

  --warning: #d97706;
  --warning-bg: #fef3c7;
  --warning-line: #fde68a;

  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --danger-line: #fecaca;

  --info: #0891b2;
  --info-bg: #cffafe;
  --info-line: #a5f3fc;

  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 90px rgba(15, 23, 42, 0.16);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 34%),
    radial-gradient(circle at bottom right, rgba(15, 23, 42, 0.06), transparent 30%),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  user-select: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card {
  width: min(1080px, 100%);
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.login-visual {
  position: relative;
  padding: 48px;
  color: #fff;
  background:
    radial-gradient(circle at 84% 18%, rgba(96, 165, 250, 0.40), transparent 26%),
    linear-gradient(145deg, #0b1220 0%, #111827 42%, #1e3a8a 100%);
  overflow: hidden;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 28px;
  pointer-events: none;
}

.login-visual::after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  right: -170px;
  bottom: -170px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.brand-large {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
  margin-bottom: 92px;
}

.logo-box,
.brand-logo {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  font-weight: 950;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.32);
}

.logo-box {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.brand-large strong,
.brand strong {
  display: block;
  letter-spacing: -0.035em;
}

.brand-large strong {
  font-size: 18px;
}

.brand strong {
  font-size: 16px;
}

.brand-large span,
.brand span {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
}

.brand-large span {
  color: #bfdbfe;
}

.login-visual h1 {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 0 18px;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

.login-visual p {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0;
  color: #dbeafe;
  line-height: 1.7;
  font-size: 15px;
}

.login-bullets {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.login-bullet {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e0f2fe;
  font-size: 14px;
}

.login-bullet i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.16);
}

.login-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
}

.login-form-wrap h2 {
  margin: 0 0 8px;
  font-size: 32px;
  letter-spacing: -0.055em;
}

.login-form-wrap > p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.demo-accounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.account-chip {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  cursor: pointer;
  transition: 0.18s ease;
}

.account-chip:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
}

.account-chip strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.account-chip code {
  color: var(--muted);
  font-size: 12px;
}

.quick-login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: 284px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 28px 22px;
  color: #fff;
  background: linear-gradient(180deg, #0b1220 0%, #111827 55%, #172033 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.side-label {
  margin: 22px 12px 10px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #dbeafe;
  font-size: 14px;
}

.nav-item.active {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(147, 197, 253, 0.30);
  color: #fff;
}

.nav-item small {
  min-width: 28px;
  text-align: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255,255,255,0.10);
  font-size: 11px;
}

.sidebar-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.055);
}

.sidebar-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
}

.sidebar-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.55;
}

.logout-btn {
  width: 100%;
  margin-top: 22px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  transition: 0.18s ease;
}

.logout-btn:hover {
  background: rgba(255,255,255,0.10);
}

.main {
  padding: 30px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(27px, 3vw, 40px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255,255,255,0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.user-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  font-weight: 950;
}

.user-pill strong {
  display: block;
  font-size: 13px;
}

.user-pill span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-card {
  position: relative;
  min-height: 208px;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-xl);
  color: #fff;
  background: linear-gradient(135deg, #0b1220 0%, #172554 100%);
  box-shadow: var(--shadow-md);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  top: -140px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
}

.hero-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 25px;
  letter-spacing: -0.045em;
}

.hero-card p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.stat-card small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-weight: 800;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  letter-spacing: -0.06em;
}

.stat-card span {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 18px;
  align-items: start;
}

.panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(226, 232, 240, 0.96);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.panel-header h3 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.035em;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-body {
  padding: 22px;
}

label {
  display: block;
  margin: 0 0 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  outline: none;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  background: #fff;
  color: var(--text);
  transition: 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

textarea {
  min-height: 124px;
  resize: vertical;
}

.field {
  margin-bottom: 16px;
}

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

.submit-btn,
.ghost-btn,
.action-btn {
  border-radius: 14px;
  border: 0;
  padding: 12px 14px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.18s ease;
}

.submit-btn {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.submit-btn:hover,
.ghost-btn:hover,
.action-btn:hover {
  transform: translateY(-1px);
}

.submit-btn:disabled,
.action-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.ghost-btn {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #334155;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.search {
  flex: 1;
  min-width: 230px;
}

.filter {
  min-width: 160px;
}

.ticket-list {
  padding: 10px;
}

.ticket-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  margin-bottom: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  transition: 0.18s ease;
}

.ticket-item:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: var(--shadow-sm);
}

.ticket-main h4 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.ticket-main p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.badge.open {
  background: var(--danger-bg);
  color: #991b1b;
  border-color: var(--danger-line);
}

.badge.progress {
  background: var(--warning-bg);
  color: #92400e;
  border-color: var(--warning-line);
}

.badge.resolved {
  background: var(--success-bg);
  color: #166534;
  border-color: var(--success-line);
}

.badge.info {
  background: var(--info-bg);
  color: #155e75;
  border-color: var(--info-line);
}

.badge.soft {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.urgency-urgent {
  background: #fff1f2;
  color: #991b1b;
  border-color: #fecdd3;
}

.urgency-normal {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.urgency-low {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.ticket-side {
  min-width: 210px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.action-btn {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #334155;
  font-size: 13px;
}

.action-btn.primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.action-btn.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

.action-btn.success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

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

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: #334155;
}

.notice {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.5;
}

.warning-note {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.file-preview {
  display: none;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.file-preview img {
  width: 100%;
  max-height: 260px;
  display: block;
  object-fit: cover;
}

.ticket-photo {
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.ticket-photo img {
  width: 100%;
  max-height: 360px;
  display: block;
  object-fit: cover;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(790px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
}

.modal-header h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

.close-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 13px;
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
  font-size: 20px;
}

.modal-body {
  padding: 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.detail-box {
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
}

.detail-box small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-box strong {
  font-size: 14px;
}

.resolution-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--success-line);
  background: var(--success-bg);
  color: #166534;
}

.locked-box {
  margin-top: 14px;
  padding: 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    display: none;
    height: auto;
  }

  .hero-grid,
  .content-grid,
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 410px;
  }
}

@media (max-width: 760px) {
  .login-body {
    padding: 16px;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-pill {
    width: 100%;
  }

  .stats-grid,
  .field-row,
  .detail-grid,
  .demo-accounts,
  .quick-login-grid {
    grid-template-columns: 1fr;
  }

  .ticket-item {
    grid-template-columns: 1fr;
  }

  .ticket-side {
    min-width: 0;
  }

  .login-form-wrap,
  .login-visual {
    padding: 28px;
  }

  .login-visual h1 {
    font-size: 40px;
  }
}
/* phase7-brand-hero-styles */
.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: 28px;
  padding: 34px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .76), rgba(30, 58, 138, .62)),
    url("../images/hero-ticket-flow.svg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .18);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(96, 165, 250, .32), transparent 34%);
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 2;
}

.hero-card h2 {
  margin: 0 0 12px;
  max-width: 720px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-card p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .84);
  font-size: 16px;
  line-height: 1.65;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-logo img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .hero-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 22px;
  }
}

/* phase8-user-management-styles */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.data-table th {
  color: #64748b;
  font-weight: 800;
  background: rgba(248, 250, 252, .86);
}

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

.small {
  padding: 8px 10px !important;
  font-size: 12px !important;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .58);
  padding: 20px;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 100px rgba(15, 23, 42, .32);
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.info-list {
  display: grid;
  gap: 14px;
}

.info-item {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .22);
}

.info-item strong {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
}

.info-item span {
  color: #64748b;
  line-height: 1.55;
}

.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 12px;
}

/* phase9-settings-styles */
.inline-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.inline-form input {
  flex: 1;
}

.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: #f8fafc;
}

.settings-row strong {
  display: block;
  color: #0f172a;
  margin-bottom: 4px;
}

.settings-row span {
  color: #64748b;
  font-size: 13px;
}

.sla-grid {
  display: grid;
  gap: 14px;
}

.sla-box {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: #f8fafc;
}

.sla-box strong {
  display: block;
  margin-bottom: 12px;
  color: #0f172a;
}

.sla-box label {
  margin-bottom: 10px;
}

.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed rgba(148, 163, 184, .4);
}

@media (max-width: 760px) {
  .inline-form {
    display: grid;
  }

  .settings-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* phase10-ticket-detail-styles */
.detail-grid {
  align-items: start;
}

.detail-box {
  display: grid;
  gap: 14px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: #f8fafc;
}

.detail-row span {
  color: #64748b;
  font-size: 13px;
}

.detail-row strong {
  color: #0f172a;
  text-align: right;
}

.detail-description {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: #f8fafc;
}

.detail-description span,
.detail-image span {
  display: block;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 8px;
}

.detail-description p {
  margin: 0;
  color: #0f172a;
  line-height: 1.7;
  white-space: pre-wrap;
}

.resolution-note {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.detail-image {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: #f8fafc;
}

.detail-image img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .22);
}

.timeline-list {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 12px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #2563eb;
  margin-top: 7px;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, .12);
}

.timeline-body {
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 16px;
  background: #f8fafc;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.timeline-head strong {
  color: #0f172a;
}

.timeline-head span {
  color: #64748b;
  font-size: 12px;
}

.timeline-body p {
  margin: 8px 0 0;
  white-space: pre-wrap;
  line-height: 1.65;
  color: #334155;
}

.timeline-body small {
  display: block;
  margin-top: 8px;
  color: #64748b;
}

.mini-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11px;
}

.public-badge {
  background: #eff6ff;
  color: #1d4ed8;
}

.internal-badge {
  background: #fff7ed;
  color: #c2410c;
}

.comment-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .22);
}

.urgency-urgent {
  background: #fee2e2;
  color: #b91c1c;
}

.urgency-normal {
  background: #eff6ff;
  color: #1d4ed8;
}

.urgency-low {
  background: #f1f5f9;
  color: #475569;
}

@media (max-width: 760px) {
  .detail-row,
  .timeline-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-row strong {
    text-align: left;
  }
}

/* phase11-ticket-detail-linker-styles */
.ticket-detail-link-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.detail-link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.data-table .detail-link-btn,
table .detail-link-btn {
  white-space: nowrap;
}

/* phase12-attachments-styles */
.attachment-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .22);
}

.attachment-list {
  display: grid;
  gap: 12px;
}

.attachment-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: #f8fafc;
}

.attachment-thumb {
  width: 72px;
  height: 72px;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .22);
  background: #ffffff;
}

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

.attachment-file-icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-decoration: none;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
  border: 1px solid rgba(37, 99, 235, .18);
}

.attachment-meta {
  min-width: 0;
}

.attachment-meta strong {
  display: block;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-meta span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.attachment-meta small {
  display: block;
  margin-top: 5px;
  color: #94a3b8;
  font-size: 12px;
}

.helper-text {
  margin: -4px 0 4px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .attachment-item {
    grid-template-columns: 56px 1fr;
  }

  .attachment-thumb,
  .attachment-file-icon {
    width: 56px;
    height: 56px;
  }

  .attachment-item .ghost-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* phase13-14-dashboard-export-styles */
.dashboard-section {
  display: grid;
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(30, 64, 175, .82)),
    url("../images/hero-dashboard.svg");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .18);
}

.dashboard-head h2 {
  margin: 4px 0 8px;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.dashboard-head p {
  margin: 0;
  color: rgba(255, 255, 255, .78);
}

.dashboard-export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-export-actions .ghost-btn {
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, .24);
  text-decoration: none;
}

.dashboard-export-actions .primary-btn {
  text-decoration: none;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 14px;
}

.stat-card {
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, .22);
  box-shadow: 0 16px 50px rgba(15, 23, 42, .06);
}

.stat-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.stat-card small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  line-height: 1.4;
}

.stat-blue {
  border-color: rgba(37, 99, 235, .22);
}

.stat-orange {
  border-color: rgba(249, 115, 22, .24);
}

.stat-purple {
  border-color: rgba(124, 58, 237, .24);
}

.stat-green {
  border-color: rgba(22, 163, 74, .24);
}

.stat-red {
  border-color: rgba(220, 38, 38, .24);
}

.stat-dark {
  border-color: rgba(15, 23, 42, .24);
}

.breakdown-list {
  display: grid;
  gap: 14px;
}

.breakdown-item {
  display: grid;
  gap: 8px;
}

.breakdown-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.breakdown-top strong {
  color: #0f172a;
}

.breakdown-top span {
  color: #64748b;
  font-weight: 900;
}

.breakdown-bar {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.breakdown-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.skeleton-card {
  color: #64748b;
}

@media (max-width: 1280px) {
  .dashboard-stats-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  .dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-export-actions {
    justify-content: flex-start;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 560px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-export-actions a {
    width: 100%;
  }
}

/* phase15-16-17-rating-replies-sla-styles */
.sla-detail-box {
  margin-top: 16px;
}

.sla-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .22);
}

.sla-card strong {
  font-size: 18px;
}

.sla-card span {
  color: #334155;
}

.sla-card small {
  color: #64748b;
}

.sla-ok {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #166534;
}

.sla-warning {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.sla-breached {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.sla-resolved {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.sla-unknown {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.sla-badge-area {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.sla-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.sla-mini-badge.sla-ok {
  background: #dcfce7;
  color: #166534;
}

.sla-mini-badge.sla-warning {
  background: #ffedd5;
  color: #c2410c;
}

.sla-mini-badge.sla-breached {
  background: #fee2e2;
  color: #b91c1c;
}

.sla-mini-badge.sla-resolved {
  background: #dbeafe;
  color: #1d4ed8;
}

.sla-mini-badge.sla-unknown {
  background: #f1f5f9;
  color: #475569;
}

.rating-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, .22);
}

.rating-display {
  display: grid;
  gap: 12px;
}

.rating-result {
  padding: 18px;
  border-radius: 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.rating-result strong {
  display: block;
  color: #f59e0b;
  font-size: 28px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.rating-result span {
  display: block;
  color: #92400e;
  font-weight: 800;
}

.rating-result p {
  margin: 10px 0 0;
  color: #78350f;
  line-height: 1.6;
}

#savedReplyWrap select {
  cursor: pointer;
}

/* company-telegram-isolation-styles */
.table-input {
  width: 100%;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
}

.table-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, .55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.data-table td .table-input {
  font-size: 13px;
}

/* language-encoding-login-fix */
.login-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, .08), transparent 32%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
  color: #0f172a;
}

.login-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  overflow: hidden;
  border-radius: 34px;
  background: #ffffff;
  box-shadow: 0 32px 120px rgba(15, 23, 42, .16);
}

.login-brand-panel {
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 58, 138, .86)),
    url("../images/hero-ticket-flow.svg");
  background-size: cover;
  background-position: center;
}

.login-brand-card {
  height: 100%;
  border-radius: 28px;
  padding: 28px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(15, 23, 42, .30);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.login-brand-top strong {
  display: block;
  font-size: 16px;
}

.login-brand-top span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.76);
  font-size: 13px;
}

.login-hero-copy h1 {
  margin: 0 0 18px;
  max-width: 520px;
  font-size: clamp(44px, 5vw, 64px);
  line-height: .95;
  letter-spacing: -0.07em;
}

.login-hero-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255,255,255,.86);
  line-height: 1.7;
}

.login-points {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.login-points li {
  color: rgba(255,255,255,.88);
  font-size: 14px;
}

.login-points li::before {
  content: "âœ“";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}

.login-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px;
}

.language-switch {
  position: absolute;
  top: 28px;
  right: 28px;
  display: inline-flex;
  padding: 5px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, .28);
}

.language-switch button {
  border: 0;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
}

.language-switch button.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .22);
}

.login-heading h2 {
  margin: 0 0 10px;
  font-size: 38px;
  letter-spacing: -0.04em;
}

.login-heading p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.login-role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0 22px;
}

.login-role-card {
  padding: 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .24);
}

.login-role-card strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}

.login-role-card span {
  color: #475569;
  font-size: 13px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.login-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .40);
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, .56);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.login-submit {
  width: 100%;
  margin-top: 2px;
}

.login-bottom-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.login-bottom-cards .ghost-btn {
  justify-content: center;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 420px;
  }

  .login-form-panel {
    padding: 42px 24px 28px;
  }
}

@media (max-width: 560px) {
  .login-role-cards,
  .login-bottom-cards {
    grid-template-columns: 1fr;
  }

  .language-switch {
    position: static;
    width: max-content;
    margin-left: auto;
    margin-bottom: 24px;
  }
}

/* company-bot-token-ui */
.token-cell {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.token-input {
  font-size: 12px;
}
