body {
  background: #f0f2f5;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.sla-alert-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid #efb700;
  background: linear-gradient(135deg, #ffe45c, #ffc933);
  color: #6a4600;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 22px rgba(255, 193, 7, 0.30);
  animation: slaAlertPulse 1.4s ease-in-out infinite;
}

.sla-alert-banner-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.58);
  color: #8a5c00;
  flex-shrink: 0;
}

@keyframes slaAlertPulse {
  0%,
  100% {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(255, 193, 7, 0.30);
  }
  50% {
    opacity: 0.82;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 193, 7, 0.40);
  }
}

/* Login */
.login-shell {
  min-height: calc(100vh - 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-panel {
  width: min(980px, 100%);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid #d9e2ee;
}

.login-brand-side {
  padding: 3rem 2.4rem;
  color: #ecf4ff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.12), transparent 40%),
    linear-gradient(135deg, #2b6fbb, #123a6f);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-brand-logo {
  width: 155px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.22));
}

.login-brand-title {
  font-weight: 700;
  font-size: 1.95rem;
  margin-bottom: 0.9rem;
  letter-spacing: 0.01em;
}

.login-brand-copy {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
  color: #dbe9fb;
}

.login-form-side {
  padding: 2.4rem 2.2rem;
}

.login-form-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #0f2744;
}

.login-form-subtitle {
  margin-bottom: 1.5rem;
  color: #5c6f85;
}

.login-form .form-control {
  border-radius: 10px;
  border-color: #c9d4e2;
  padding: 0.62rem 0.78rem;
}

.login-form .form-control:focus {
  border-color: #1b5eaa;
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 170, 0.14);
}

.login-submit-btn {
  border-radius: 10px;
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
  font-weight: 600;
}

.login-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
  color: #4a5a6f;
}

.login-footer-link {
  display: block;
  text-decoration: none;
  color: #1b5eaa;
  font-size: 0.86rem;
  line-height: 1.5;
  margin-bottom: 0.2rem;
  word-break: break-word;
}

.login-footer-link:hover {
  color: #114176;
  text-decoration: underline;
}

.login-footer-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.login-footer-wa-icon {
  width: 0.95rem;
  height: 0.95rem;
  fill: #18a84f;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .login-shell {
    min-height: 0;
  }

  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-brand-side {
    padding: 2rem 1.4rem;
  }

  .login-brand-logo {
    width: 128px;
  }

  .login-brand-title {
    font-size: 1.55rem;
  }

  .login-form-side {
    padding: 1.6rem 1.2rem;
  }
}

/* ===================== Header ===================== */
.app-header {
  flex-shrink: 0;
  background:
    radial-gradient(circle at 12% 45%, rgba(255,255,255,0.18), transparent 38%),
    radial-gradient(circle at 95% 50%, rgba(255,255,255,0.06), transparent 42%),
    linear-gradient(135deg, #2b6fbb, #123a6f);
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.22);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.app-header-top {
  padding: 0.6rem 1.2rem;
}

/* Logo / marca */
.app-header-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  flex-shrink: 0;
  padding-right: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.app-header-logo {
  height: 52px;
  width: auto;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 10px;
  padding: 0.24rem 0.45rem;
  filter:
    brightness(1.18)
    contrast(1.08)
    drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
  transition: filter 0.2s;
}

.app-header-brand:hover .app-header-logo {
  filter:
    brightness(1.26)
    contrast(1.1)
    drop-shadow(0 3px 12px rgba(0, 0, 0, 0.5));
}

.app-header-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  gap: 0.1rem;
}

.app-header-brand-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.app-header-brand-tagline {
  font-size: 0.64rem;
  color: #c0d9f0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* Nav links */
.app-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 1.5rem;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.72rem;
  border-radius: 8px;
  color: #c8dff5;
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.app-nav-link:hover,
.app-nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.app-nav-link svg {
  opacity: 0.85;
  flex-shrink: 0;
}

/* Collapse wrapper */
.app-nav-collapse {
  flex-grow: 1;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

/* Usuário */
.app-header-user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border-left: 1px solid rgba(255,255,255,0.15);
  padding-left: 1.1rem;
  margin-left: auto;
  flex-shrink: 0;
}

.app-header-avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: rgba(255,255,255,0.20);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}

.app-header-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.app-header-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.app-header-user-role {
  font-size: 0.72rem;
  color: #a8c8ea;
  text-transform: capitalize;
  letter-spacing: 0.04em;
}

.app-header-user-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.app-header-user-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  color: #a8c8ea;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.app-header-user-link:hover {
  background: rgba(255,255,255,0.14);
  color: #ffffff;
}

/* Toggler mobile */
.app-header-toggler {
  border-color: rgba(255,255,255,0.4);
  padding: 0.3rem 0.5rem;
}

/* Main content spacing */
.app-main {
  flex: 1;
  overflow-y: auto;
  padding-top: 2rem;
  padding-bottom: 2rem;
  min-height: 0;
}

/* ===================== Footer ===================== */
.app-footer {
  flex-shrink: 0;
  background:
    radial-gradient(circle at 5% 50%, rgba(255,255,255,0.07), transparent 40%),
    linear-gradient(135deg, #2b6fbb, #123a6f);
  color: #c8dff5;
  padding: 0.95rem 1rem;
  margin-top: 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-height: 34px;
}

.app-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.app-footer-logo {
  height: 30px;
  width: auto;
  filter: brightness(1.2) drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}

.app-footer-brand-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d8eaf8;
  line-height: 1.15;
}

.app-footer-copy {
  font-size: 0.76rem;
  margin: 0;
  color: #8ab3d6;
  line-height: 1.15;
}

.app-footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-footer-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.68rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #bcdbf5;
  text-decoration: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.15s, color 0.15s;
}

.app-footer-link:hover {
  background: rgba(255,255,255,0.16);
  color: #ffffff;
}

.app-footer-link--wa svg {
  color: #25d366;
}

/* ===================== Responsive header ===================== */
@media (max-width: 991px) {
  .app-header-top {
    padding: 0.55rem 0.8rem;
  }

  .app-header-brand {
    border-right: none;
    padding-right: 0;
    margin-bottom: 0.3rem;
  }

  .app-header-logo {
    height: 46px;
  }

  .app-header-brand-tagline {
    letter-spacing: 0.1em;
  }

  .app-nav-collapse {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 0;
  }

  .app-nav {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 0.75rem 0;
    width: 100%;
  }

  .app-nav-link {
    width: 100%;
  }

  .app-header-user {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-left: 0;
    padding-top: 0.75rem;
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 576px) {
  .app-footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .app-footer-links {
    justify-content: center;
  }
}

.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 1rem;
}

.navbar-logo {
  height: 28px;
  width: auto;
  display: block;
}

.navbar-nav .nav-link {
  padding-left: 0.9rem;
  padding-right: 0.9rem;
  font-size: 0.9rem;
}

.navbar-text {
  font-size: 0.9rem;
}

.card {
  border-radius: 0.6rem;
}

.badge-status-aberto {
  background-color: #6c757d;
}

.badge-status-em_andamento {
  background-color: #ffc107;
  color: #212529;
}

.badge-status-aguardando_usuario {
  background-color: #0dcaf0;
  color: #212529;
}

.badge-status-resolvido {
  background-color: #198754;
}

.badge-status-fechado {
  background-color: #343a40;
}

.badge-priority-baixa {
  background-color: #198754;
}

.badge-priority-media {
  background-color: #0d6efd;
}

.badge-priority-alta {
  background-color: #fd7e14;
}

.badge-priority-critica {
  background-color: #dc3545;
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 1.8rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at 0% 50%, rgba(255,255,255,0.1), transparent 45%),
    linear-gradient(135deg, #2b6fbb, #123a6f);
  color: #fff;
}

.page-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.page-header-sub {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: #c8daee;
}

/* Stat cards */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e0e8f4;
  border-left: 5px solid #1b5eaa;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.stat-card--open  { border-left-color: #6c757d; }
.stat-card--progress { border-left-color: #ffc107; }
.stat-card--done  { border-left-color: #198754; }

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  color: #0f2744;
  line-height: 1.1;
}

.stat-card-label {
  font-size: 0.82rem;
  color: #5c6f85;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Tickets table */
.tickets-table-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e0e8f4;
}

.tickets-table thead tr {
  background: #f5f8fc;
}

.tickets-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4a5a6f;
  font-weight: 600;
  border-bottom: 2px solid #dce8f5;
  padding: 0.85rem 1rem;
  white-space: nowrap;
}

.tickets-table tbody tr {
  border-bottom: 1px solid #edf2f8;
  transition: background 0.12s;
}

.tickets-table tbody tr:last-child {
  border-bottom: none;
}

.tickets-table tbody tr:hover {
  background: #f0f6ff;
}

.tickets-table td {
  padding: 0.82rem 1rem;
  vertical-align: middle;
}

.tickets-title {
  font-weight: 500;
  color: #0f2744;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tickets-btn-detail {
  border-radius: 8px;
  font-size: 0.82rem;
  padding: 0.28rem 0.7rem;
  white-space: nowrap;
}

.tickets-empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
}

.tickets-empty-icon {
  margin-bottom: 0.8rem;
  opacity: 0.7;
}

/* ===================== Admin panel ===================== */
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem;
  background: #f5f8fc;
  border-bottom: 1px solid #dce8f5;
  border-radius: 14px 14px 0 0;
}

.admin-panel-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #1b4a80;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1b4a80;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding-left: 0.2rem;
  border-left: 4px solid #2b6fbb;
  padding-left: 0.65rem;
}

/* Badge de refresh no header admin */
.admin-refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #6c8caa;
  background: rgba(27,94,170,0.08);
  border: 1px solid rgba(27,94,170,0.15);
  border-radius: 20px;
  padding: 0.18rem 0.65rem;
}

