:root {
  --bg: #eef4ff;
  --bg-soft: #f8fbff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --border: #dbe4f0;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 0 22%),
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.12), transparent 0 20%),
    linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
}

body {
  line-height: 1.5;
}

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

a:hover {
  color: var(--primary-dark);
}

pre {
  margin: 0;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 20px 16px 36px;
}

.app-topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 18px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.94) 48%, rgba(15, 118, 110, 0.92) 100%);
  border: 1px solid rgba(129, 140, 248, 0.24);
  border-radius: 22px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(14px);
}

.app-topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(129,140,248,0.14), rgba(45,212,191,0.18));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.brand-block {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.brand-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 188px;
  height: 102px;
  padding: 8px 10px;
  border-radius: 22px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-logo::before {
  content: none;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.04);
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.18));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-copy strong {
  font-size: 23px;
  color: #f8fafc;
  letter-spacing: 0.01em;
}

.brand-copy small {
  color: #cbd5e1;
  font-size: 15px;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.app-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  min-height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.2s ease-in-out;
}

.nav-link:hover {
  border-color: rgba(129,140,248,0.32);
  background: rgba(255,255,255,0.14);
  color: #ffffff;
}

.nav-link.is-active {
  color: #fff;
  border-color: rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.92) 0%, rgba(6, 182, 212, 0.82) 100%);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.24);
}

.user-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.user-pill-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #cbd5e1;
}

.user-pill small {
  color: #cbd5e1;
}

.app-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.15;
}

.page-subtitle {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
}

.page-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2,
.card h3,
.card h4 {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

.err {
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 14px;
  background: #fef2f2;
  color: #991b1b;
}

.notice {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.notice-success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

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

.stat-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #dbe4f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.stat-card.is-primary {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12) 0%, rgba(99, 102, 241, 0.04) 100%);
}

.stat-card.is-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(34, 197, 94, 0.04) 100%);
}

.stat-card.is-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(251, 191, 36, 0.04) 100%);
}

.stat-card.is-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(248, 113, 113, 0.04) 100%);
}

.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.stat-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 20px 12px;
}

.table-responsive {
  overflow-x: auto;
}

.admin-ops-table-wrap {
  padding-bottom: 4px;
}

.admin-ops-table {
  width: 100%;
  min-width: 1160px;
  table-layout: fixed;
}

.admin-ops-table th,
.admin-ops-table td {
  padding: 12px 10px;
}

.admin-ops-table thead th {
  white-space: nowrap;
  word-break: normal;
}

.admin-ops-table tbody td {
  word-break: break-word;
}

.admin-ops-table th:nth-child(1),
.admin-ops-table td:nth-child(1) {
  width: 56px;
}

.admin-ops-table th:nth-child(2),
.admin-ops-table td:nth-child(2) {
  width: 14%;
}

.admin-ops-table th:nth-child(3),
.admin-ops-table td:nth-child(3),
.admin-ops-table th:nth-child(5),
.admin-ops-table td:nth-child(5),
.admin-ops-table th:nth-child(7),
.admin-ops-table td:nth-child(7),
.admin-ops-table th:nth-child(9),
.admin-ops-table td:nth-child(9),
.admin-ops-table th:nth-child(10),
.admin-ops-table td:nth-child(10) {
  width: 8%;
}

.admin-ops-table th:nth-child(4),
.admin-ops-table td:nth-child(4) {
  width: 10.5%;
  white-space: nowrap;
}

.admin-ops-table th:nth-child(6),
.admin-ops-table td:nth-child(6),
.admin-ops-table th:nth-child(8),
.admin-ops-table td:nth-child(8) {
  width: 12%;
}

.admin-ops-table th:last-child,
.admin-ops-table td:last-child {
  width: 156px;
  min-width: 156px;
}

.admin-actions-cell .form-actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-width: 0;
  gap: 8px;
}

.admin-actions-cell .btn {
  width: 100%;
  padding: 9px 10px;
  font-size: 14px;
  white-space: nowrap;
}

.quote-items-table table {
  table-layout: fixed;
}

.quote-items-table th:nth-child(1),
.quote-items-table td:nth-child(1) {
  width: 48px;
}

.quote-items-table th:nth-child(2),
.quote-items-table td:nth-child(2) {
  width: auto;
}

.quote-items-table th:nth-child(3),
.quote-items-table td:nth-child(3) {
  width: 88px;
}

.quote-items-table th:nth-child(4),
.quote-items-table td:nth-child(4) {
  width: 84px;
}

.quote-items-table th:nth-child(5),
.quote-items-table td:nth-child(5),
.quote-items-table th:nth-child(6),
.quote-items-table td:nth-child(6) {
  width: 140px;
}

.quote-items-table input {
  width: 100%;
  min-width: 0;
}

.quote-item-name {
  min-width: 280px;
}

.quote-item-qty {
  max-width: 72px;
  text-align: center;
}

.quote-item-unit {
  max-width: 68px;
  text-align: center;
}

.quote-item-price {
  max-width: 120px;
  text-align: right;
}

.table-meta {
  color: var(--muted);
  font-size: 13px;
}

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

table thead th {
  padding: 13px 16px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

table td {
  padding: 14px 16px;
  border-top: 1px solid #eef2f7;
  vertical-align: top;
}

table tbody tr {
  transition: background-color 0.18s ease-in-out;
}

table tbody tr:hover {
  background: #f8fbff;
}

tr.row-status-new {
  background-color: rgba(224, 231, 255, 0.36);
}

tr.row-status-in-progress {
  background-color: rgba(254, 243, 199, 0.38);
}

tr.row-status-done {
  background-color: rgba(220, 252, 231, 0.42);
}

tr.row-status-cancelled {
  background-color: rgba(254, 226, 226, 0.42);
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-new {
  background: #e0e7ff;
  color: #1d4ed8;
}

.status-in-progress {
  background: #fef3c7;
  color: #b45309;
}

.status-done {
  background: #dcfce7;
  color: #047857;
}

.status-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

button,
input[type="submit"],
input[type="button"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.22);
}

.btn-secondary {
  background: #eef2ff;
  color: var(--primary-dark);
  border: 1px solid #c7d2fe;
  box-shadow: none;
}

.btn-secondary:hover {
  box-shadow: none;
}

label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
  color: #334155;
}

input:not([type]),
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
input[type="month"],
input[type="file"],
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

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

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

small {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.full-span {
  grid-column: 1 / -1;
}

.info-grid,
.ticket-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.info-box {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.info-box strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.info-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.95fr);
  gap: 18px;
}

.section-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ticket-description {
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  white-space: pre-wrap;
}

.attachment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}

.attachment-item strong {
  display: block;
}

.attachment-meta {
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 10px;
  width: 2px;
  background: linear-gradient(180deg, #c7d2fe 0%, #dbeafe 100%);
}

.timeline-item {
  position: relative;
  padding-left: 34px;
}

.timeline-point {
  position: absolute;
  top: 10px;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #14b8a6 100%);
  border: 4px solid #eef4ff;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.18);
}

.timeline-card {
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

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

.timeline-text {
  margin: 8px 0;
}

.timeline-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.summary-card {
  background: linear-gradient(180deg, #eef2ff 0%, #f8fbff 100%);
  border-color: #c7d2fe;
}

.empty-state {
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.auth-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 180px);
  padding: 18px 0;
  isolation: isolate;
}

.auth-wrap::before,
.auth-wrap::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.8;
  animation: auth-float 12s ease-in-out infinite;
}

.auth-wrap::before {
  top: 10px;
  left: 4%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0) 72%);
}

.auth-wrap::after {
  right: 3%;
  bottom: 0;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.20) 0%, rgba(20, 184, 166, 0) 74%);
  animation-delay: -4s;
}

.auth-card {
  width: 100%;
  max-width: 980px;
}

.auth-card-premium {
  position: relative;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(167, 180, 255, 0.24);
  background:
    radial-gradient(circle at top right, rgba(99, 102, 241, 0.18), transparent 0 26%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.12), transparent 0 24%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.82) 0%, rgba(17, 24, 39, 0.74) 100%);
  backdrop-filter: blur(20px) saturate(120%);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-card-premium::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.62) 50%, rgba(255,255,255,0) 100%);
}

.auth-card-premium::after {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.18) 0%, rgba(129, 140, 248, 0) 68%);
  z-index: -1;
  animation: auth-float 14s ease-in-out infinite;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  align-items: stretch;
}

.auth-grid > div {
  min-width: 0;
}

.auth-aside {
  padding: 8px 8px 8px 0;
}

.auth-aside-premium {
  position: relative;
  padding: 34px 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.26), transparent 0 34%),
    linear-gradient(155deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 27, 75, 0.97) 56%, rgba(15, 118, 110, 0.90) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-aside-premium::before {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 72%);
  pointer-events: none;
}

.auth-aside-premium .eyebrow,
.auth-aside-premium .page-title,
.auth-aside-premium .page-subtitle,
.auth-aside-premium .check-list {
  color: #e5eefc;
}

.auth-aside-premium .eyebrow {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-aside-premium .page-subtitle {
  color: rgba(226, 232, 240, 0.9);
}

.auth-aside-premium .check-list {
  color: rgba(226, 232, 240, 0.92);
}

.auth-aside-premium .page-title {
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.08;
  text-shadow: 0 10px 28px rgba(15, 23, 42, 0.32);
}

.auth-form-panel {
  padding: 30px 28px;
}

.auth-form-panel-enterprise {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,252,0.96) 100%);
  backdrop-filter: blur(20px);
}

.auth-form-panel-enterprise::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.16) 0%, rgba(167, 139, 250, 0) 70%);
  pointer-events: none;
}

.auth-form-panel-enterprise h2 {
  margin-bottom: 2px;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 999px;
  background: rgba(238, 242, 255, 0.9);
  color: #4338ca;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-helper {
  margin: 6px 0 18px;
  color: var(--muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form.form-grid {
  display: grid;
}

.auth-form-panel-enterprise label {
  color: #1e293b;
}

.auth-form-panel-enterprise input:not([type]),
.auth-form-panel-enterprise input[type="text"],
.auth-form-panel-enterprise input[type="password"],
.auth-form-panel-enterprise input[type="email"] {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  border-color: #d8e1ef;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 8px 18px rgba(15, 23, 42, 0.04);
}

.input-with-icon {
  position: relative;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.input-with-icon:hover {
  filter: saturate(1.02);
}

.input-with-icon:focus-within {
  transform: translateY(-1px);
}

.field-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  color: #4f46e5;
  box-shadow: inset 0 0 0 1px rgba(199, 210, 254, 0.9), 0 6px 14px rgba(79, 70, 229, 0.08);
  pointer-events: none;
}

.field-icon svg {
  width: 15px;
  height: 15px;
}

.input-with-icon input {
  padding-left: 52px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.input-with-icon:focus-within input {
  border-color: #7c3aed;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12), 0 14px 32px rgba(99, 102, 241, 0.12);
}

.input-with-icon:focus-within .field-icon {
  color: #312e81;
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}

.input-with-icon.has-action input {
  padding-right: 52px;
}

.field-action-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.field-action-icon:hover {
  color: #312e81;
  background: rgba(99, 102, 241, 0.10);
}

.field-action-icon:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 2px;
}

.field-action-icon.is-active {
  color: #4338ca;
}

.field-action-icon svg {
  width: 18px;
  height: 18px;
}

.password-strength {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.password-strength-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.password-strength-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #cbd5e1;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.password-strength-text {
  color: #64748b;
  font-size: 12px;
}

.password-strength.is-weak .password-strength-bar span {
  width: 25%;
  background: #dc2626;
}

.password-strength.is-fair .password-strength-bar span {
  width: 50%;
  background: #f59e0b;
}

.password-strength.is-good .password-strength-bar span {
  width: 75%;
  background: #2563eb;
}

.password-strength.is-strong .password-strength-bar span {
  width: 100%;
  background: #059669;
}

.password-strength.is-weak .password-strength-text {
  color: #b91c1c;
}

.password-strength.is-fair .password-strength-text {
  color: #b45309;
}

.password-strength.is-good .password-strength-text {
  color: #1d4ed8;
}

.password-strength.is-strong .password-strength-text {
  color: #047857;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-actions {
  margin-top: 10px;
}

.auth-links-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -2px;
}

.auth-link-soft {
  color: #4f46e5;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.auth-link-soft:hover {
  text-decoration: underline;
}

.field-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.lookup-note {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.lookup-note.is-success {
  color: #047857;
}

.lookup-note.is-error {
  color: #b91c1c;
}

.btn-compact {
  min-height: 40px;
  padding: 9px 14px;
}

.btn-equal {
  min-width: 180px;
  min-height: 46px;
}

.register-mode-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin: 4px 0 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.95) 0%, rgba(224, 231, 255, 0.95) 100%);
  border: 1px solid #c7d2fe;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.register-mode-tab {
  min-width: 150px;
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4338ca;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.register-mode-tab:hover {
  background: rgba(79, 70, 229, 0.10);
}

.register-mode-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
}

.register-mode-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid #dbe4f0;
  color: #475569;
  font-size: 13px;
}

.btn-enterprise {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 42%, #0ea5e9 100%);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-enterprise::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.btn-enterprise::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30%;
  width: 30%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.34) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg);
  transition: left 0.32s ease;
}

.btn-enterprise:hover {
  box-shadow: 0 20px 42px rgba(79, 70, 229, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-enterprise:hover::after {
  left: 120%;
}

.auth-actions .btn-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, #f8fafc 100%);
  color: #334155;
  border: 1px solid #dbe4f0;
}

.check-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: #334155;
}

.check-list li + li {
  margin-top: 6px;
}

@keyframes auth-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -10px, 0) scale(1.04);
  }
}

.upload-progress {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-text {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #3730a3;
}

.upload-progress-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.upload-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #dbeafe;
}

.upload-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary) 0%, #14b8a6 100%);
  transition: width 0.2s ease-in-out;
}

.upload-progress.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.upload-progress.is-error .upload-progress-text {
  color: #b91c1c;
}

.is-uploading button,
.is-uploading input[type="submit"] {
  opacity: 0.75;
  cursor: wait;
}

.upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(4px);
}

.upload-overlay[hidden] {
  display: none;
}

.upload-overlay-card {
  min-width: 300px;
  max-width: 440px;
  text-align: center;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 18px;
  padding: 26px 22px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

.upload-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.upload-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 44px;
  padding: 4px 8px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.20);
}

.upload-brand-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upload-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
}

.upload-overlay-title {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 700;
  color: #f8fafc;
}

.upload-overlay-text {
  margin-top: 8px;
  font-size: 14px;
  color: #cbd5e1;
}

.upload-spinner,
.upload-success-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto;
}

.upload-spinner {
  border-radius: 50%;
  border: 4px solid rgba(199, 210, 254, 0.35);
  border-top-color: #818cf8;
  animation: upload-spin 0.8s linear infinite;
}

.upload-success-icon {
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #22c55e 100%);
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.35);
}

.upload-overlay.is-success .upload-spinner {
  display: none;
}

.upload-overlay.is-success .upload-success-icon {
  display: flex;
  animation: upload-success-pop 0.45s ease-out;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(3px);
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-modal-card {
  width: min(100%, 430px);
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid #fecaca;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.feedback-modal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.26);
}

.feedback-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.feedback-modal-text {
  margin-top: 10px;
  color: #475569;
}

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

@keyframes upload-success-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .ticket-layout,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 14px 10px 24px;
  }

  .app-topbar {
    padding: 12px;
    border-radius: 16px;
  }

  .brand-copy strong {
    font-size: 14px;
  }

  .page-title {
    font-size: 26px;
  }

  .card {
    padding: 16px;
  }

  table thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  table td {
    padding: 8px 16px;
    border-top: none;
  }

  table tbody tr {
    padding: 8px 0 12px;
    border-top: 1px solid #e5e7eb;
  }
}
