* {
  box-sizing: border-box;
}

:root {
  --app-max-width: min(108rem, calc(100vw - 1.5rem));
  --app-padding-x: clamp(0.75rem, 2vw, 1.5rem);
  --app-padding-y: clamp(1.5rem, 3vw, 3rem);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f7fb;
  color: #1f2937;
}

a {
  color: inherit;
}

.page {
  max-width: var(--app-max-width);
  width: 100%;
  margin: 0 auto;
  padding: var(--app-padding-y) var(--app-padding-x)
    calc(var(--app-padding-y) + 0.5rem);
}

.card {
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 24px;
  margin-bottom: 24px;
}

.narrow-card {
  max-width: 640px;
  margin: 48px auto 0;
}

.card h1 {
  margin: 0 0 12px;
}

.lead {
  margin: 0;
  line-height: 1.6;
  color: #475569;
}

.eyebrow {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.section-header .actions {
  margin-top: 0;
  flex-shrink: 0;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 10px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #1d4ed8;
}

.button-link {
  background: #0f172a;
}

.button-link:hover {
  background: #020617;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 0;
}

.details-grid div {
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.details-grid dt {
  margin-bottom: 6px;
  color: #475569;
  font-weight: 700;
}

.details-grid dd {
  margin: 0;
  word-break: break-word;
}

.muted-text {
  color: #94a3b8;
}

/* Sign-in pages — SMT-inspired split layout */
body.body--signin {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #3730a3 100%);
}

.portal-signin {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
}

.portal-signin__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.portal-signin__orb {
  position: absolute;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  filter: blur(40px);
}

.portal-signin__orb--1 {
  top: 5rem;
  left: 2.5rem;
  width: 18rem;
  height: 18rem;
  animation: portal-float 6s ease-in-out infinite;
}

.portal-signin__orb--2 {
  right: 2.5rem;
  bottom: 5rem;
  width: 24rem;
  height: 24rem;
  background: rgba(255, 255, 255, 0.05);
  animation: portal-float-delay 8s ease-in-out infinite;
}

.portal-signin__orb--3 {
  top: 50%;
  left: 50%;
  width: 31rem;
  height: 31rem;
  transform: translate(-50%, -50%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
  filter: blur(60px);
  animation: portal-pulse 4s ease-in-out infinite;
}

@keyframes portal-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes portal-float-delay {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(15px); }
}

@keyframes portal-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

.portal-signin__hero {
  display: none;
  position: relative;
  z-index: 1;
  width: 50%;
  padding: 3rem;
  align-items: center;
  justify-content: center;
}

.portal-signin__hero-inner {
  max-width: 32rem;
  text-align: center;
  color: #ffffff;
}

.portal-signin__hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.25rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  animation: portal-bounce-slow 3s ease-in-out infinite;
}

@keyframes portal-bounce-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.portal-signin__hero-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(90deg, #ffffff, #dbeafe);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.portal-signin__hero-lead {
  margin: 1rem 0 0;
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.55;
  color: #dbeafe;
}

.portal-signin__carousel {
  position: relative;
  margin-top: 2rem;
  min-height: 9rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.portal-signin__carousel-slide {
  display: none;
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.portal-signin__carousel-slide.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.portal-signin__carousel-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.75rem;
  color: #ffffff;
}

.portal-signin__carousel-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.portal-signin__carousel-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #dbeafe;
}

.portal-signin__carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.portal-signin__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.3s ease, background 0.3s ease;
}

.portal-signin__dot.is-active {
  width: 1.5rem;
  background: #ffffff;
}

.portal-signin__main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.portal-signin__main-inner {
  width: 100%;
  max-width: 28rem;
}

.portal-signin__mobile-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
  text-align: center;
}

.portal-signin__mobile-title {
  margin: 0.5rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
}

.portal-signin__card {
  padding: 2rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(16px);
}

.portal-signin__card-head {
  text-align: center;
}

.portal-signin__logo {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 120px;
  height: auto;
  object-fit: contain;
}

.portal-signin__logo--card {
  max-width: 140px;
  margin-bottom: 0.5rem;
}

.portal-signin__welcome {
  margin: 0.75rem 0 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
}

.portal-signin__subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #4b5563;
}

.portal-signin__card-body {
  margin-top: 1.25rem;
}

.portal-signin__ms-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.25rem;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 1rem;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.portal-signin__ms-btn:hover {
  background: linear-gradient(90deg, #1d4ed8, #1e40af);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
  transform: scale(1.02);
}

.portal-signin__ms-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.portal-signin__ms-btn-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}

.portal-signin__ms-btn-arrow {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.portal-signin__ms-btn:hover .portal-signin__ms-btn-arrow {
  transform: translateX(4px);
}

.portal-signin__secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 1rem;
  border: 2px solid #2563eb;
  background: #ffffff;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.portal-signin__secondary-btn:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.portal-signin__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0;
  color: #9ca3af;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-signin__divider::before,
.portal-signin__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.portal-signin__input {
  border-radius: 0.75rem;
  border-color: #d1d5db;
}

.portal-signin__input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.portal-signin__link-row {
  margin: 0.75rem 0 0;
  text-align: center;
}

.portal-signin__text-link {
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.portal-signin__text-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.portal-signin__features-box {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 0.85rem;
  background: linear-gradient(90deg, #eff6ff, #eef2ff);
  border: 1px solid #bfdbfe;
}

.portal-signin__features-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
}

.portal-signin__features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.portal-signin__features-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.75rem;
  color: #4b5563;
}

.portal-signin__features-list svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #2563eb;
}

.portal-signin__features-list strong {
  display: block;
  font-size: 0.8rem;
  color: #1f2937;
}

.portal-signin__footer-note {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
  text-align: center;
  font-size: 0.75rem;
  color: #6b7280;
}

.portal-signin__credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(90deg, #eef2ff, #f5f3ff, #eff6ff);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
}

.portal-signin__credit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #ffffff;
  flex-shrink: 0;
}

.portal-signin__credit-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
}

.portal-signin__credit-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #4b5563;
}

.portal-signin__credit-sub strong {
  color: #4338ca;
}

@media (min-width: 1024px) {
  .portal-signin__hero {
    display: flex;
  }

  .portal-signin__mobile-brand {
    display: none;
  }

  .portal-signin__logo--card {
    display: block;
  }
}

@media (max-width: 1023px) {
  .portal-signin__logo--card {
    display: none;
  }
}

/* Legacy sign-in (kept for compatibility) */
.page--signin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: clamp(1.25rem, 4vh, 2.5rem);
  padding-bottom: clamp(1.25rem, 4vh, 2.5rem);
  box-sizing: border-box;
}

.signin-tile {
  width: 100%;
  max-width: min(28rem, calc(100% - 2rem));
  margin-inline: auto;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.75rem, 4vw, 2.25rem);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: #ffffff;
  box-shadow:
    0 2px 4px rgb(15 23 42 / 0.06),
    0 20px 50px -12px rgb(15 23 42 / 0.28);
}

.signin-tile__brand {
  margin-bottom: 0;
}

.signin-tile__logo {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: min(200px, 92%);
  height: auto;
  max-height: 140px;
  object-fit: contain;
}

.signin-tile__product-name {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: clamp(1.4rem, 3.6vw, 1.8rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b45309;
}

.signin-tile__welcome {
  margin: 0.5rem 0 0;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.signin-tile__subtitle {
  margin: 0.5rem 0 0;
  font-size: clamp(0.98rem, 2.4vw, 1.05rem);
  line-height: 1.55;
  color: #64748b;
}

.signin-tile__ms-button {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(37 99 235 / 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.signin-tile__ms-button:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 14px rgb(37 99 235 / 0.45);
}

.signin-tile__ms-button:active {
  transform: translateY(1px);
}

.signin-tile__ms-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.signin-tile__ms-label {
  flex: 1;
  text-align: center;
}

.signin-tile__ms-arrow {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  color: #ffffff;
  opacity: 0.95;
}

.signin-tile__features {
  margin-top: 1.5rem;
  text-align: left;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f0f6ff 0%, #e8f0fc 100%);
  border: 1px solid #d4e3f7;
}

.signin-tile__features-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #c9daf0;
  color: #1e40af;
  font-weight: 700;
  font-size: 0.95rem;
}

.signin-tile__features-shield {
  display: flex;
  color: #2563eb;
}

.signin-tile__features-title {
  line-height: 1.3;
}

.signin-tile__features-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.signin-tile__feature {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #d9e6f5;
}

.signin-tile__feature:last-child {
  border-bottom: none;
  padding-bottom: 0.15rem;
}

.signin-tile__feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 2px;
  color: #2563eb;
}

.signin-tile__feature-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.signin-tile__feature-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.signin-tile__feature-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}

.signin-tile__footer {
  margin: 1.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}

.signin-tile__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.85rem;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signin-tile__divider::before,
.signin-tile__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.signin-tile__pension-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid #2563eb;
  background: #ffffff;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.signin-tile__pension-button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.signin-form {
  width: 100%;
  margin-top: 0;
  text-align: left;
}

.signin-form__submit {
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.signin-tile__manual {
  margin: 0.85rem 0 0;
  text-align: center;
}

.signin-tile__manual-link {
  color: #2563eb;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.signin-tile__manual-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.signin-access-denied {
  width: 100%;
  margin: 1.15rem 0 0.25rem;
  padding: 1.25rem 1.1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid #fecaca;
  background: linear-gradient(180deg, #fffafa 0%, #fef2f2 100%);
  text-align: center;
}

.signin-access-denied__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.65rem;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
}

.signin-access-denied__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b91c1c;
}

.signin-access-denied__message {
  margin: 0.45rem 0 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
  color: #7f1d1d;
}

.signin-access-denied__hint {
  margin: 0.55rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #991b1b;
}

.form-field {
  display: block;
  margin-bottom: 0.9rem;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
}

.form-input:focus {
  outline: 2px solid #93c5fd;
  border-color: #2563eb;
}

.form-error {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-success {
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.9rem;
  line-height: 1.45;
}

.query-form {
  margin-top: 0.5rem;
  max-width: 42rem;
}

.query-form--readonly .form-input--readonly {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.45;
}

.query-form--readonly .form-textarea--readonly {
  min-height: 7rem;
  white-space: pre-wrap;
}

.ticket-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 1.5rem;
  align-items: start;
}

.ticket-detail-layout__main .query-form {
  max-width: none;
}

.ticket-comments {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.ticket-comments__header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.ticket-comments__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.ticket-comments__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.ticket-comments__alert {
  margin: 0 0 0.85rem;
}

.ticket-comments__list-wrap {
  flex: 1;
  margin-bottom: 1rem;
}

.ticket-comments__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 1.25rem;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}

.ticket-comments__empty-icon {
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.ticket-comments__empty-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #64748b;
}

.ticket-comments__empty-text {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.ticket-comments__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-height: 420px;
  overflow-y: auto;
}

.ticket-comment {
  padding: 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.ticket-comment__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.ticket-comment__author {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.ticket-comment__time {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
}

.ticket-comment__text {
  margin: 0;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.ticket-comment__attachment {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.88rem;
}

.ticket-comments__form {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.ticket-comments__form-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.ticket-comments__form-icon {
  color: #64748b;
}

.ticket-comments__form-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.ticket-comments__field {
  margin-bottom: 0.85rem;
}

.ticket-comments__textarea {
  min-height: 6.5rem;
}

.ticket-comments__submit {
  width: 100%;
}

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

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

  .ticket-comments__list {
    max-height: none;
  }
}

.form-field--hidden {
  display: none;
}

.form-textarea {
  min-height: 7rem;
  resize: vertical;
}

.form-input--file {
  padding: 0.65rem 0.75rem;
}

.form-hint {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.45;
}

.form-notice--blocked {
  margin: 0 0 0.65rem;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  line-height: 1.45;
}

.field-hint--error {
  color: #b91c1c;
}

.field-hint--success {
  color: #047857;
}

.form-input--invalid {
  border-color: #f87171;
  background: #fff7f7;
}

.form-input--valid {
  border-color: #34d399;
  background: #f0fdf4;
}

.password-field {
  position: relative;
}

.password-field__input {
  padding-right: 4.5rem;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 0.65rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.password-field__toggle:hover {
  color: #1d4ed8;
}

.password-field__toggle--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
}

.password-field__toggle--icon:hover {
  background: #eff6ff;
}

.password-field__eye {
  display: block;
}

.password-field__eye[hidden] {
  display: none;
}

.password-rules {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.password-rule {
  font-size: 0.85rem;
  line-height: 1.45;
  padding-left: 1.25rem;
  position: relative;
}

.password-rule::before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: 700;
}

.password-rule--invalid {
  color: #b91c1c;
}

.password-rule--invalid::before {
  content: "✕";
  color: #b91c1c;
}

.password-rule--valid {
  color: #047857;
}

.password-rule--valid::before {
  content: "✓";
  color: #047857;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-input--readonly,
.form-input:disabled {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.form-input.editable-field--active:not(:disabled) {
  background: #ffffff;
  color: #0f172a;
  cursor: text;
}

.input-with-action {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.input-with-action .form-input {
  flex: 1;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.icon-button:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.icon-button--field {
  flex-shrink: 0;
  align-self: flex-start;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.password-update-panel {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid #e2e8f0;
}

select.form-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.section-header .pension-nav {
  flex-wrap: wrap;
  max-width: 34rem;
}

.section-header .staff-nav {
  flex-wrap: wrap;
  max-width: 28rem;
}

.actions--toolbar {
  margin-top: 0;
  margin-bottom: 1rem;
}

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

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

.queries-table th,
.queries-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.queries-table th {
  color: #334155;
  background: #f8fafc;
}

.query-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: none;
}

.query-link:hover {
  text-decoration: underline;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 700;
}

.details-grid__full {
  grid-column: 1 / -1;
}

.bulk-upload-panel {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.bulk-validation-results {
  margin: 1.5rem 0;
}

.bulk-validation-table .validation-error-text {
  color: #b91c1c;
  font-size: 0.85rem;
  line-height: 1.45;
}

.bulk-validation-table .validation-ok-text {
  color: #047857;
  font-weight: 600;
}

.bulk-row--error {
  background: #fff7f7;
}

.bulk-row--ok {
  background: #f8fffb;
}

/* App shell — top header + paginated lists */
.body--app {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f1f5f9;
  min-height: 100vh;
}

.page--app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.page-heading {
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  margin: 0.25rem 0 0.5rem;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.app-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.app-header__logo {
  display: block;
  border-radius: 4px;
}

.app-header__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-header__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1d4ed8;
  letter-spacing: -0.02em;
}

.app-header__subtitle {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 500;
}

.app-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.app-header__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-header__nav-link:hover {
  color: #1d4ed8;
  background: #f8fafc;
}

.app-header__nav-link.is-active {
  color: #1d4ed8;
  background: #eff6ff;
  border-bottom-color: #2563eb;
}

.app-header__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.app-header__user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.app-header__user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.app-header__user-role {
  font-size: 0.78rem;
  color: #64748b;
  text-transform: capitalize;
}

.app-header__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.app-header__user-menu {
  position: relative;
}

.app-header__avatar-btn {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.app-header__avatar-btn:hover .app-header__avatar,
.app-header__user-menu:focus-within .app-header__avatar {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.app-header__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 120;
}

.app-header__user-menu:hover .app-header__dropdown,
.app-header__user-menu:focus-within .app-header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.app-header__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-header__dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.query-list-filters {
  margin: 0 0 1.25rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.query-list-filters__grid {
  display: grid;
  gap: 0.85rem;
}

.query-list-filters__grid--staff {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.query-list-filters__grid--pension {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.query-list-filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.query-list-filters__label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.query-list-filters__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.ticket-comments__form-disabled-text {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.5;
}

.resolution-summary {
  margin-bottom: 1.25rem;
  border: 1px solid #bbf7d0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
  overflow: hidden;
}

.resolution-summary__header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  background: #ecfdf5;
  border-bottom: 1px solid #bbf7d0;
}

.resolution-summary__header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
}

.resolution-summary__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #14532d;
}

.resolution-summary__body {
  padding: 1rem;
}

.resolution-summary__details {
  padding: 0.9rem 1rem;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  background: #fff;
}

.resolution-summary__label {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #166534;
}

.resolution-summary__resolver {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.5;
}

.resolution-summary__time {
  display: block;
  margin-top: 0.2rem;
  color: #16a34a;
  font-size: 0.88rem;
  font-weight: 600;
}

.resolution-summary__reopen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.resolution-summary__reopen-title {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.resolution-summary__reopen-hint {
  margin: 0;
  color: #64748b;
  font-size: 0.88rem;
}

.button-reopen {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #f97316;
  background: #fff;
  color: #ea580c;
}

.button-reopen:hover {
  background: #fff7ed;
  color: #c2410c;
}

.ticket-comments__form-disabled {
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.ticket-comments__form-disabled-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
}

.list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.list-pagination__summary {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
}

.list-pagination__summary strong {
  color: #0f172a;
  font-weight: 700;
}

.list-pagination__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.list-pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.list-pagination__btn:hover:not(.is-disabled) {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.list-pagination__btn.is-disabled {
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.7;
}

.list-pagination__pages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.list-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.35rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.list-pagination__page:hover:not(.is-current) {
  background: #e2e8f0;
}

.list-pagination__page.is-current {
  background: #2563eb;
  color: #fff;
}

@media (max-width: 960px) {
  .app-header__inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .app-header__nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .app-header__user-meta {
    display: none;
  }

  .query-list-filters__grid--staff,
  .query-list-filters__grid--pension {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .section-header {
    flex-direction: column;
  }

  .section-header .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .query-list-filters__grid--staff,
  .query-list-filters__grid--pension {
    grid-template-columns: 1fr;
  }
}
