:root {
  --panel-bg: #101821;
  --panel-bg-alt: #0c1218;
  --panel-border: #273341;
  --panel-border-strong: #3a4756;
  --text-strong: #f3f7fb;
  --muted: #93a2b4;
  --accent: #4dd2ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

body.home-page {
  --panel-bg: #101821;
  --panel-bg-alt: #0c1218;
  --panel-border: #273341;
  --panel-border-strong: #3a4756;
  --text-strong: #f3f7fb;
  --muted: #93a2b4;
  --accent: #4dd2ff;
  --ok: #3ddc84;
  --warn: #f2c94c;
  --danger: #ff6b6b;
  background: radial-gradient(
    1200px circle at 15% 0%,
    #223043 0%,
    #0f172a 45%,
    #0b1118 100%
  );
  color: #dbe3ec;
  font-family: "Segoe UI", "Bahnschrift", "Trebuchet MS", sans-serif;
}

body.dashboard-page {
  --panel-bg: #101821;
  --panel-bg-alt: #0c1218;
  --panel-border: #273341;
  --panel-border-strong: #3a4756;
  --text-strong: #f3f7fb;
  --muted: #93a2b4;
  --accent: #4dd2ff;
  --ok: #0ed64a;
  --warn: #f2c94c;
  --danger: #ff6b6b;
  background: radial-gradient(
    1200px circle at 15% 0%,
    #223043 0%,
    #0f172a 45%,
    #0b1118 100%
  );
  color: #dbe3ec;
  font-family: "Segoe UI", "Bahnschrift", "Trebuchet MS", sans-serif;
}

body.login-page {
  --panel-bg: #101821;
  --panel-border: #273341;
  --text-strong: #f3f7fb;
  --muted: #93a2b4;
  --accent: #4dd2ff;
  min-height: 100vh;
  background:
    radial-gradient(900px circle at top left, rgba(77, 210, 255, 0.18), transparent 55%),
    linear-gradient(160deg, #0a0f14 0%, #0f172a 48%, #162131 100%);
  color: #dbe3ec;
  font-family: "Segoe UI", "Bahnschrift", "Trebuchet MS", sans-serif;
}

.is-hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  width: min(420px, 100%);
  padding: 2rem 1.8rem;
  border-radius: 24px;
  background: rgba(16, 24, 33, 0.92);
  border: 1px solid rgba(77, 210, 255, 0.18);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.login-logo {
  display: block;
  width: 78px;
  height: auto;
  margin: 0 auto 1rem;
}

.login-kicker {
  text-align: center;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.login-title {
  margin: 0.45rem 0 1.5rem;
  text-align: center;
  font-size: 2rem;
  color: var(--text-strong);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #b9c6d6;
}

.login-input {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(77, 210, 255, 0.18);
  background: rgba(8, 12, 18, 0.85);
  color: var(--text-strong);
  outline: none;
}

.login-input:focus {
  border-color: rgba(77, 210, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(77, 210, 255, 0.12);
}

.login-input--error {
  border-color: rgba(255, 77, 79, 0.85);
  box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.12);
}

.login-error {
  margin-top: -0.2rem;
}

.login-error small {
  display: block;
  color: #ff4d4f;
  font-size: 0.82rem;
  line-height: 1.35;
}

.login-button {
  min-height: 48px;
  margin-top: 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 210, 255, 0.45);
  background: linear-gradient(135deg, rgba(77, 210, 255, 0.2), rgba(77, 210, 255, 0.08));
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.login-button:hover {
  border-color: rgba(77, 210, 255, 0.75);
  box-shadow: 0 0 18px rgba(77, 210, 255, 0.18);
  transform: translateY(-1px);
}

.login-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* HOME STYLES */
.home-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

.home-page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-page-shell > .home-shell {
  width: 100%;
  flex: 1 0 auto;
}

.screen-page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen-page-content {
  width: 100%;
  flex: 1 0 auto;
}

.home-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: 1.6rem 0;
  margin-bottom: 2.4rem;
}

.home-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.home-header-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
}

.teares-header .home-header-right {
  justify-content: flex-end;
}

.home-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.home-availability {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 210, 255, 0.35);
  background: rgba(12, 18, 24, 0.9);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.home-action-btn,
.home-availability {
  height: 36px;
  padding: 0 0.95rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.home-action-btn {
  border: 1px solid rgba(77, 210, 255, 0.4);
  background: rgba(12, 18, 24, 0.9);
  color: var(--text-strong);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  text-decoration: none;
}

.home-action-btn:hover {
  border-color: rgba(77, 210, 255, 0.7);
  box-shadow: 0 0 12px rgba(77, 210, 255, 0.2);
  transform: translateY(-1px);
}

.home-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.teares-shell {
  max-width: 1400px;
}

.admin-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.admin-tab {
  min-height: 42px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 210, 255, 0.24);
  background: rgba(12, 18, 24, 0.86);
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.admin-tab:hover {
  border-color: rgba(77, 210, 255, 0.55);
  box-shadow: 0 0 14px rgba(77, 210, 255, 0.14);
  transform: translateY(-1px);
}

.admin-tab.is-active {
  border-color: rgba(77, 210, 255, 0.7);
  background: rgba(77, 210, 255, 0.12);
  box-shadow: 0 0 18px rgba(77, 210, 255, 0.16);
}

.tab-panel {
  min-height: 180px;
}

.teares-table-card {
  padding: 0.8rem 0.9rem;
}

.teares-list-card {
  padding: 1.1rem;
}

.teares-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.tear-admin-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1.25rem 1.35rem;
  border-radius: 18px;
  border: 1px solid rgba(77, 210, 255, 0.16);
  background: linear-gradient(160deg, rgba(18, 28, 38, 0.92) 0%, rgba(12, 18, 24, 0.98) 100%);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tear-admin-card:hover {
  border-color: rgba(77, 210, 255, 0.3);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(77, 210, 255, 0.08);
}

.tear-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.tear-admin-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 420px;
}

.tear-admin-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.tear-admin-title {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.tear-admin-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  color: #c5d3e0;
  font-size: 0.88rem;
}

.tear-admin-meta-item {
  color: #d7e1eb;
}

.tear-admin-meta-divider {
  color: rgba(147, 162, 180, 0.55);
}

.tear-admin-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-left: auto;
  padding-left: 0.35rem;
}

.tear-admin-actions .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow:
    0 10px 18px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.tear-admin-actions .action-btn--edit {
  border-color: rgba(77, 210, 255, 0.55);
  background: linear-gradient(135deg, rgba(77, 210, 255, 0.2), rgba(77, 210, 255, 0.08));
  color: #eef9ff;
}

.tear-admin-actions .action-btn--edit:hover {
  border-color: rgba(77, 210, 255, 0.82);
  background: linear-gradient(135deg, rgba(77, 210, 255, 0.28), rgba(77, 210, 255, 0.12));
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.22),
    0 0 16px rgba(77, 210, 255, 0.18);
  transform: translateY(-1px) scale(1.02);
}

.tear-admin-actions .action-btn--delete {
  border-color: rgba(255, 107, 107, 0.62);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.08));
  color: #fff0f0;
}

.tear-admin-actions .action-btn--delete:hover {
  border-color: rgba(255, 107, 107, 0.86);
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.28), rgba(255, 107, 107, 0.12));
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.22),
    0 0 16px rgba(255, 107, 107, 0.18);
  transform: translateY(-1px) scale(1.02);
}

.action-btn__icon {
  font-size: 0.95rem;
  line-height: 1;
}

.teares-table-wrapper {
  max-height: 520px;
  overflow: auto;
  border-radius: 12px;
}

.teares-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.teares-table thead th {
  position: sticky;
  top: 0;
  background: rgba(12, 18, 24, 0.95);
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid rgba(77, 210, 255, 0.2);
}

.teares-table tbody td {
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid rgba(39, 51, 65, 0.7);
  color: #dbe3ec;
}

.teares-table tbody tr:hover {
  background: rgba(77, 210, 255, 0.06);
}

.teares-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.empresas-list-card {
  padding: 1.1rem;
}

.empresas-list {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.empresa-card {
  border-radius: 18px;
  border: 1px solid rgba(77, 210, 255, 0.16);
  background: linear-gradient(160deg, rgba(18, 28, 38, 0.92) 0%, rgba(12, 18, 24, 0.98) 100%);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.empresa-card:hover {
  border-color: rgba(77, 210, 255, 0.3);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(77, 210, 255, 0.08);
}

.empresa-card.is-expanded {
  border-color: rgba(77, 210, 255, 0.38);
}

.empresa-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.35rem 1.45rem;
  cursor: pointer;
  flex-wrap: wrap;
}

.empresa-card-main {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 420px;
}

.empresa-card-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.empresa-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.empresa-card-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.02em;
}

.empresa-card-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  color: #c5d3e0;
  font-size: 0.88rem;
}

.empresa-meta-item {
  color: #d7e1eb;
}

.empresa-meta-divider {
  color: rgba(147, 162, 180, 0.55);
}

.empresa-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.empresa-detail-card {
  margin: 0 1.1rem 1.1rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border-top: 1px solid rgba(77, 210, 255, 0.12);
  border-radius: 16px;
  background: rgba(8, 12, 18, 0.55);
  box-shadow: inset 0 0 0 1px rgba(77, 210, 255, 0.05);
}

.turnos-list-card {
  padding: 1.1rem;
}

.turnos-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.turno-admin-card {
  border-radius: 18px;
  border: 1px solid rgba(77, 210, 255, 0.16);
  background: linear-gradient(160deg, rgba(18, 28, 38, 0.92) 0%, rgba(12, 18, 24, 0.98) 100%);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.turno-admin-card:hover {
  border-color: rgba(77, 210, 255, 0.3);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(77, 210, 255, 0.08);
}

.turno-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.2rem 1.35rem;
  flex-wrap: wrap;
}

.turno-admin-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 420px;
}

.turno-admin-kicker {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  color: var(--muted);
}

.turno-admin-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.turno-admin-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-strong);
}

.turno-admin-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  color: #c5d3e0;
  font-size: 0.88rem;
}

.turno-admin-meta-item {
  color: #d7e1eb;
}

.turno-admin-meta-divider {
  color: rgba(147, 162, 180, 0.55);
}

.turno-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.empresa-users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.empresa-users-heading {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.empresa-users-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.empresa-detail-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.empresa-users-table {
  margin-top: 0.2rem;
  border-radius: 14px;
  border: 1px solid rgba(77, 210, 255, 0.08);
  background: rgba(10, 15, 20, 0.72);
}

.empresa-empty {
  padding: 0.95rem 0.2rem 0.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.empresa-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 210, 255, 0.2);
  background: rgba(12, 18, 24, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
}

.empresa-status.is-active {
  border-color: rgba(61, 220, 132, 0.4);
  background: rgba(61, 220, 132, 0.12);
  color: #d7ffe7;
}

.empresa-status.is-inactive {
  border-color: rgba(255, 107, 107, 0.28);
  background: rgba(255, 107, 107, 0.08);
  color: #ffd7d7;
}

.table-readonly {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.action-btn {
  border: 1px solid rgba(77, 210, 255, 0.35);
  background: rgba(12, 18, 24, 0.9);
  color: var(--text-strong);
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.action-btn:hover {
  border-color: rgba(77, 210, 255, 0.7);
  box-shadow: 0 0 10px rgba(77, 210, 255, 0.2);
  transform: translateY(-1px);
}

.action-btn--soft {
  background: rgba(77, 210, 255, 0.08);
  border-color: rgba(77, 210, 255, 0.22);
}

.action-btn--delete {
  border-color: rgba(255, 107, 107, 0.45);
  color: #ffe1e1;
}

.action-btn--delete:hover {
  border-color: rgba(255, 107, 107, 0.7);
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.2);
}

.teares-confirm-text {
  font-size: 1rem;
  color: var(--text-strong);
  margin: 1rem 0;
}

.btn-novo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 30px;
  border: 1px solid rgba(0, 200, 255, 0.5);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-novo:hover {
  background: rgba(0, 200, 255, 0.12);
  border-color: rgba(0, 200, 255, 0.9);
  transform: scale(1.05);
}

.btn-icon {
  font-size: 20px;
  font-weight: 700;
  line-height: 0;
  margin-top: -1px;
}

.home-availability-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.home-availability-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-strong);
}

.logout-icon-btn {
  position: fixed;
  right: 18px;
  bottom: 42px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(12, 18, 24, 0.48);
  color: rgba(219, 227, 236, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  z-index: 900;
}

.logout-icon-btn:hover {
  background: rgba(12, 18, 24, 0.72);
  color: rgba(243, 247, 251, 0.92);
  border-color: rgba(148, 163, 184, 0.38);
  transform: translateY(-1px);
}

.logout-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.home-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.home-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-strong);
}

.home-loading {
  text-align: center;
  padding: 3rem 0;
  color: var(--muted);
}

.home-loading .spinner-border {
  color: var(--accent);
}

.home-alert {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffd7d7;
}

.home-empty {
  text-align: center;
  padding: 2rem 0;
  color: var(--muted);
  font-size: 1rem;
}

.tear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  gap: 1.6rem;
  justify-content: flex-start;
}

.tear-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  height: 210px;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: linear-gradient(160deg, #151f2a 0%, #0c1218 70%);
  text-decoration: none;
  color: inherit;
  position: relative;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.35s ease;
  cursor: pointer;
  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.tear-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(77, 210, 255, 0.15),
    0 0 24px rgba(77, 210, 255, 0.08);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tear-card:hover {
  transform: translateY(-3px);
  border-color: rgba(77, 210, 255, 0.6);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(77, 210, 255, 0.2);
}

.tear-card:hover::after {
  opacity: 1;
}

.tear-card.status-green {
  background: #26973f;
  border-color: rgba(61, 220, 132, 0.95);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(61, 220, 132, 0.5),
    0 0 18px rgba(61, 220, 132, 0.2);
}

.tear-card.status-yellow {
  background: #b6a726;
  border-color: rgba(242, 201, 76, 0.95);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(242, 201, 76, 0.5),
    0 0 18px rgba(242, 201, 76, 0.22);
}

.tear-card.status-red {
  background: #e91717;
  border-color: rgba(255, 107, 107, 0.95);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 107, 107, 0.5),
    0 0 18px rgba(255, 107, 107, 0.22);
}

.tear-card.status-off {
  background: #11151b;
  border-color: rgba(148, 163, 184, 0.45);
}

.tear-card.status-green .tear-id,
.tear-card.status-yellow .tear-id,
.tear-card.status-red .tear-id,
.tear-card.status-off .tear-id {
  color: rgba(248, 250, 252, 0.78);
}

.tear-card.status-green .tear-cta,
.tear-card.status-yellow .tear-cta,
.tear-card.status-red .tear-cta,
.tear-card.status-off .tear-cta {
  color: rgba(226, 243, 255, 0.85);
}

.tear-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tear-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-strong);
}

.tear-id,
.tear-subinfo {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.tear-voltas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  width: 100%;
}

.tear-voltas-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: #ffffff;
}

.tear-voltas-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  aspect-ratio: 1 / 1;
  padding: 0 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 18, 24, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1;
  transition:
    background 0.35s ease,
    border-color 0.35s ease;
}

.tear-voltas-value.status-green {
  background: rgba(16, 70, 46, 0.85);
  border-color: rgba(61, 220, 132, 0.55);
}

.tear-voltas-value.status-yellow {
  background: rgba(90, 66, 18, 0.85);
  border-color: rgba(242, 201, 76, 0.58);
}

.tear-voltas-value.status-red {
  background: rgba(94, 26, 26, 0.85);
  border-color: rgba(255, 107, 107, 0.58);
}

.tear-voltas-value.status-off {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(148, 163, 184, 0.2);
}

.tear-cta {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
}

.cadastro-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 16, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 60;
  backdrop-filter: blur(2px);
}

.cadastro-card {
  width: min(420px, 100%);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 1.8rem 1.9rem 1.6rem;
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 420px;
}

.cadastro-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-strong);
}

.cadastro-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin-top: -0.35rem;
}

.cadastro-error {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.45);
  color: #ffd7d7;
  font-size: 0.9rem;
}

.cadastro-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cadastro-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cadastro-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #b9c6d6;
}

.cadastro-input {
  background: #0b1117;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0.85rem 0.9rem;
  color: var(--text-strong);
  font-size: 1.05rem;
  min-height: 46px;
  outline: none;
}

.cadastro-input:focus {
  border-color: rgba(77, 210, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(77, 210, 255, 0.12);
}

.cadastro-input:disabled {
  opacity: 0.7;
}

.cadastro-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.9rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.cadastro-btn {
  border: 1px solid rgba(77, 210, 255, 0.55);
  background: rgba(77, 210, 255, 0.16);
  color: #eaf6ff;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.cadastro-btn:hover {
  border-color: rgba(77, 210, 255, 0.8);
  box-shadow: 0 0 14px rgba(77, 210, 255, 0.2);
  transform: translateY(-1px);
}

.cadastro-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cadastro-btn--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.45);
  color: #dbe3ec;
}

.modal-backdrop,
.cadastro-overlay {
  background: rgba(0, 0, 0, 0.55);
  padding: 22px;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(520px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 20, 32, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  padding: 22px 22px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-card--wide {
  width: min(760px, 100%);
}

.dashboard-report-card {
  width: min(560px, 100%);
}

.dashboard-report-body {
  gap: 0.95rem;
}

.dashboard-report-body .modal-label,
.dashboard-report-body .modal-input {
  width: 100%;
}

.dashboard-report-card .modal-actions {
  margin-top: 14px;
}

.dashboard-report-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.dashboard-report-actions .btn-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 0;
}

@media (max-width: 640px) {
  .dashboard-report-actions {
    flex-direction: column;
  }
}

.modal-card--turno {
  width: min(860px, 100%);
  height: 90vh;
  max-height: 90vh;
  overflow: hidden;
}

.modal-card--turno .modal-title {
  margin-bottom: 4px;
}

.modal-card--turno .modal-subtitle {
  margin-bottom: 12px;
}

.modal-card--turno .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  padding-bottom: 0;
}

.modal-card--turno .modal-form-section {
  gap: 0.5rem;
}

.modal-card--turno .modal-form-section:first-child {
  flex-shrink: 0;
}

.modal-card--turno .modal-form-section--divider {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0.35rem;
  padding-top: 0.5rem;
}

.modal-card--turno .modal-section-title {
  margin-bottom: 6px;
  font-size: 12px;
}

.modal-card--turno .modal-label {
  margin-bottom: 0;
}

.modal-turno-company {
  flex-shrink: 0;
}

.modal-card--turno .modal-actions {
  position: static;
  bottom: auto;
  z-index: auto;
  margin-top: 10px;
  padding-top: 10px;
  gap: 10px;
  background: transparent;
  backdrop-filter: none;
  flex-shrink: 0;
}

.turnos-dias-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 6px 0;
}

.modal-subtitle {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 18px 0;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

.modal-form-section {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.turno-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.turno-grid-header {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 6px auto;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.turno-grid-header span:first-child,
.turno-dia-label {
  min-width: 0;
}

.turno-grid-header span:not(:first-child) {
  text-align: center;
}

.turno-dia-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 4px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  min-height: 30px;
  width: 100%;
  max-width: 600px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.turno-dia-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.turno-time-input {
  width: 120px;
  justify-self: start;
  margin-top: 0;
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
}

.modal-form-section--divider {
  margin-top: 0.8rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-section-title {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(175, 210, 235, 0.92);
}

.modal-form-grid--empresa {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.95rem 1rem;
}

.modal-col-small {
  grid-column: span 1;
}

.modal-col-medium {
  grid-column: span 2;
}

.modal-col-large {
  grid-column: span 3;
}

.modal-col-full {
  grid-column: 1 / -1;
}

.modal-form-grid--empresa .modal-col-cidade {
  grid-column: 2 / -1;
  grid-row: 1;
}

.modal-form-grid--empresa .modal-col-rua {
  grid-column: 1 / -1;
  grid-row: 2;
}

.modal-form-grid--empresa .modal-col-numero {
  grid-column: 1 / 2;
  grid-row: 3;
}

.modal-form-grid--empresa .modal-col-bairro {
  grid-column: 2 / -1;
  grid-row: 3;
}

.modal-form-grid--empresa .modal-col-ativo {
  grid-column: 1 / -1;
  grid-row: 4;
}

.modal-label {
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  display: block;
  font-weight: 600;
}

.modal-input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 255, 255, 0.92);
  padding: 0 14px;
  outline: none;
  font-size: 15px;
  margin-top: 0.55rem;
}

select.modal-input {
  appearance: none;
}

.modal-input:focus {
  border-color: rgba(0, 200, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 200, 255, 0.12);
}

.modal-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.5;
  margin: 6px 0 6px 0;
}

.modal-warn {
  color: rgba(255, 120, 120, 0.95);
  font-weight: 600;
  margin-top: 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-modal {
  padding: 12px 22px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 12px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.btn-modal:hover {
  border-color: rgba(0, 200, 255, 0.7);
  box-shadow: 0 0 12px rgba(0, 200, 255, 0.2);
  transform: translateY(-1px);
}

.btn-modal.primary {
  border-color: rgba(0, 200, 255, 0.55);
  background: rgba(0, 200, 255, 0.12);
}

.btn-modal.danger {
  border-color: rgba(255, 80, 80, 0.55);
  background: rgba(255, 80, 80, 0.12);
}

.modal-error {
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.45);
  color: #ffd7d7;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

@supports (aspect-ratio: 1 / 1) {
  .tear-card {
    aspect-ratio: 1 / 1;
    height: auto;
  }
}

@media (max-width: 720px) {
  .home-shell {
    padding: 2rem 1rem 3.5rem;
  }

  .home-header {
    gap: 1.2rem;
  }

  .home-logo {
    height: 30px;
  }

  .tear-card {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    min-height: 0;
    padding: 1.35rem 1.1rem;
    gap: 1rem;
  }

  .tear-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tear-card-header {
    align-items: center;
    text-align: center;
    gap: 0.4rem;
  }

  .tear-title {
    font-size: 1.05rem;
    line-height: 1.25;
    text-align: center;
  }

  .tear-id,
  .tear-subinfo {
    font-size: 0.78rem;
    line-height: 1.35;
    text-align: center;
  }

  .tear-voltas {
    gap: 0.65rem;
    margin-top: 0.2rem;
  }

  .tear-voltas-label {
    font-size: 0.72rem;
    line-height: 1.3;
    text-align: center;
  }

  .tear-voltas-value {
    position: static;
    min-width: 0;
    width: min(132px, 100%);
    aspect-ratio: auto;
    min-height: 76px;
    padding: 0.85rem 1rem;
    font-size: 2.1rem;
    line-height: 1;
    margin: 0 auto;
  }

  .home-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .home-header-left {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .home-header-right {
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    text-align: center;
  }

  .home-action-btn,
  .home-availability {
    width: 100%;
    min-height: 46px;
    padding: 0.8rem 1rem;
    justify-content: center;
  }

  .home-availability {
    gap: 0.6rem;
    flex-wrap: wrap;
  }

  .home-logo {
    align-self: center;
  }

  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .modal-form-grid--empresa {
    grid-template-columns: 1fr;
  }

  .turno-grid-header {
    display: none;
  }

  .turno-dia-row {
    display: grid;
    grid-template-columns: 78px 96px 96px;
    gap: 8px;
    max-width: 100%;
  }

  .turno-dia-label {
    font-size: 12px;
  }

  .turno-time-input {
    width: 96px;
    min-width: 96px;
  }

  .modal-col-small,
  .modal-col-medium,
  .modal-col-large,
  .modal-col-full,
  .modal-form-grid--empresa .modal-col-cidade,
  .modal-form-grid--empresa .modal-col-rua,
  .modal-form-grid--empresa .modal-col-numero,
  .modal-form-grid--empresa .modal-col-bairro,
  .modal-form-grid--empresa .modal-col-ativo {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .empresa-card-header {
    padding: 1.15rem 1.1rem;
  }

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

  .empresa-detail-card {
    margin: 0 0.8rem 0.8rem;
  }

  .turno-admin-header {
    padding: 1.15rem 1.1rem;
  }

  .turno-admin-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-height: 800px) {
  .modal-card--turno {
    height: 90vh;
    max-height: 90vh;
  }

  .turno-dia-row {
    padding: 2px 5px;
    margin-bottom: 1px;
    min-height: 28px;
  }

  .turno-time-input {
    height: 20px;
    min-height: 20px;
    font-size: 11px;
  }

  .turno-dia-label {
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .home-title {
    font-size: 1.7rem;
  }

  .home-kicker {
    letter-spacing: 0.24em;
  }

  .home-action-btn {
    font-size: 0.72rem;
  }

  .home-availability-value {
    font-size: 1.05rem;
  }

  .home-logo {
    order: 3;
    align-self: center;
    height: 24px;
    margin-top: 0.1rem;
  }

  .logout-icon-btn {
    right: 12px;
    bottom: 12px;
  }

  .empresa-card-title {
    font-size: 1.12rem;
  }

  .empresa-card-meta {
    font-size: 0.8rem;
  }

  .turno-admin-title {
    font-size: 1.08rem;
  }

  .turno-admin-meta {
    font-size: 0.8rem;
  }

  .tear-admin-card {
    padding: 1.1rem 1.05rem;
  }

  .tear-admin-title {
    font-size: 1.08rem;
  }

  .tear-admin-header {
    gap: 0.9rem;
  }

  .tear-admin-actions {
    width: 100%;
    justify-content: flex-start;
    padding-left: 0;
  }

  .tear-admin-meta {
    font-size: 0.8rem;
  }
}

/* DASHBOARD STYLES */
.factory-shell {
  max-width: 1400px;
}

.dashboard-page .factory-shell {
  padding-top: 1rem !important;
  padding-bottom: 0.5rem !important;
}

.section-block {
  margin-bottom: 48px;
}

.dashboard-page .section-block {
  margin-bottom: 20px;
}

.dashboard-page .section-block:last-child {
  margin-bottom: 0;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.dashboard-page .panel-header {
  margin-bottom: 1rem;
}

.panel-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.panel-title-copy {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(77, 210, 255, 0.2);
  background: transparent;
  color: var(--text-strong);
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.back-button:hover {
  border-color: rgba(77, 210, 255, 0.55);
  box-shadow: 0 0 16px rgba(77, 210, 255, 0.2);
  transform: translateX(-1px);
}

.back-button-text {
  display: none;
}

.back-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.panel-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.panel-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-strong);
}

.panel-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.meta-line--actions {
  margin-top: 0.45rem;
  justify-content: flex-end;
}

.dashboard-report-trigger {
  min-width: 190px;
}

.brand-logo {
  height: 34px;
  width: auto;
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(77, 210, 255, 0.18));
}

.meta-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.meta-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-strong);
}

.panel-loading {
  text-align: center;
  padding: 3rem 0;
  color: var(--muted);
}

.panel-loading .spinner-border {
  color: var(--accent);
}

.panel-alert {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: #ffd7d7;
}

.panel-alert .btn {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.panel-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.panel-card--hero {
  background: linear-gradient(160deg, #1a2531 0%, #0f151c 60%);
  border-color: var(--panel-border-strong);
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(77, 210, 255, 0.08);
  min-height: 230px;
}

.panel-card--primary {
  background: linear-gradient(140deg, #101a24 0%, #0c1218 100%);
  border-color: rgba(77, 210, 255, 0.4);
}

.panel-card--diagnostic {
  background: var(--panel-bg-alt);
}

.panel-card--ports {
  background: #0b1117;
  padding: 1.2rem 1.3rem;
}

.panel-card--kpi {
  padding: 0.95rem 1rem;
}

.panel-card--kpi-hero {
  background: linear-gradient(
    145deg,
    rgba(18, 28, 38, 0.95) 0%,
    rgba(12, 18, 24, 1) 70%
  );
  border-color: rgba(77, 210, 255, 0.55);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(77, 210, 255, 0.12);
  text-align: center;
  padding: 1.3rem 1.4rem;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.hero-value {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  margin-top: 0.6rem;
  font-variant-numeric: tabular-nums;
}

.hero-number {
  font-size: clamp(2.8rem, 5vw, 4.1rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-strong);
}

.hero-unit {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 1px solid transparent;
}

.chip-ok {
  color: #d7ffe7;
  background: rgba(54, 218, 128, 0.15);
  border-color: rgba(61, 220, 132, 0.5);
}

.chip-warn {
  color: #fff1c2;
  background: rgba(242, 201, 76, 0.16);
  border-color: rgba(242, 201, 76, 0.45);
}

.chip-danger {
  color: #ffe1e1;
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.5);
}

.chip-off {
  color: #c6d1dd;
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.35);
}

.kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.kpi-value--big {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.kpi-value--hero {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #e6f6ff;
  text-shadow: 0 0 18px rgba(77, 210, 255, 0.25);
}

.kpi-value.small {
  font-size: 0.95rem;
  color: #cbd5e1;
}

.kpi-unit {
  font-size: 0.95rem;
  color: var(--muted);
  margin-left: 0.2rem;
}

.diagnostic-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 0.7rem;
}

.diagnostic-layout {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.diagnostic-tech {
  flex: 1 1 auto;
  min-width: 0;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
}

.diag-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.diag-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #d0d7e2;
  word-break: break-all;
}

.diag-registros {
  flex: 0 0 280px;
  border: 1px solid rgba(77, 210, 255, 0.45);
  border-radius: 12px;
  padding: 18px 22px;
  background: linear-gradient(
    160deg,
    rgba(17, 27, 38, 0.9) 0%,
    rgba(12, 18, 24, 1) 70%
  );
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(77, 210, 255, 0.12);
}

.dashboard-page .diag-registros {
  padding: 14px 18px;
}

.diag-registros-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #7aa7c7;
  margin-bottom: 0.4rem;
}

.diag-registros-value {
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7fe3ff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}

.production-section {
  margin-bottom: 24px;
}

.dashboard-page .production-section {
  margin-bottom: 14px;
}

.production-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.production-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--muted);
}

.production-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1.2rem;
  align-items: stretch;
}

.production-side {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  align-items: stretch;
  padding: 0;
}

.production-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.production-card--main {
  background: linear-gradient(150deg, #101a24 0%, #0b1117 70%);
  border-color: rgba(77, 210, 255, 0.35);
  align-items: flex-start;
  text-align: left;
}

.production-card--main.status-green {
  background: #26973f;
  border-color: rgba(61, 220, 132, 0.85);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(61, 220, 132, 0.25);
}

.production-card--main.status-yellow {
  background: #b6a726;
  border-color: rgba(242, 201, 76, 0.85);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(242, 201, 76, 0.25);
}

.production-card--main.status-red {
  background: #e91717;
  border-color: rgba(255, 107, 107, 0.85);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 107, 107, 0.25);
}

.production-card--main.status-off {
  background: #11151b;
  border-color: rgba(148, 163, 184, 0.35);
}

.production-card--secondary {
  background: linear-gradient(160deg, #0f1722 0%, #0c1218 70%);
  border-color: rgba(58, 71, 86, 0.6);
  gap: 0.45rem;
  padding: 0.8rem 1rem;
  justify-content: center;
  text-align: center;
  min-height: 180px;
}

.production-card-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.production-value {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}

.production-value--secondary {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #d7f2ff;
}

.production-value--badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  aspect-ratio: 1 / 1;
  padding: 0 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 18, 24, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
  align-self: flex-start;
  width: fit-content;
}

.status-green {
  background: rgba(61, 220, 132, 0.18);
  border-color: rgba(61, 220, 132, 0.45);
}

.status-yellow {
  background: rgba(242, 201, 76, 0.2);
  border-color: rgba(242, 201, 76, 0.48);
}

.status-red {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.48);
}

.status-off {
  background: rgba(0, 0, 0, 0.42);
  border-color: rgba(148, 163, 184, 0.2);
}

.production-sub {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.production-card--secondary .production-sub {
  margin-top: 0.2rem;
}

.production-legend {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.production-chart {
  position: relative;
  width: 100%;
  align-self: stretch;
  background: #0a0f14;
  border: 1px solid rgba(39, 51, 65, 0.6);
  border-radius: 12px;
  padding: 0.5rem 0.6rem 0.8rem;
  min-height: 190px;
}

.dashboard-page .production-chart {
  min-height: 176px;
  padding-bottom: 0.6rem;
}

.production-sparkline {
  width: 100%;
  height: 180px;
  display: block;
}

.dashboard-page .production-sparkline {
  height: 166px;
}

.sparkline-grid .grid-line {
  stroke: rgba(148, 163, 184, 0.12);
  stroke-width: 1;
}

.sparkline-axis .tick-line {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1;
}

.tick-label {
  font-size: 0.55rem;
  fill: #7aa7c7;
  letter-spacing: 0.08em;
}

.tick-label--y {
  font-size: 0.6rem;
}

.sparkline-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(77, 210, 255, 0.35));
}

.sparkline-point {
  fill: #8adfff;
  opacity: 0.6;
}

.sparkline-point--last {
  opacity: 1;
  fill: #c2f3ff;
  filter: drop-shadow(0 0 6px rgba(77, 210, 255, 0.55));
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(10, 15, 20, 0.7);
  border-radius: 10px;
}

.registros-section {
  display: flex;
  justify-content: center;
  margin: 0;
}

.registros-card {
  width: min(420px, 100%);
  text-align: center;
  border-color: rgba(77, 210, 255, 0.45);
  background: linear-gradient(
    160deg,
    rgba(17, 27, 38, 0.9) 0%,
    rgba(12, 18, 24, 1) 70%
  );
  box-shadow:
    0 16px 28px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(77, 210, 255, 0.12);
}

.registros-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #7aa7c7;
  margin-bottom: 0.4rem;
}

.registros-value {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #7fe3ff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.25);
}

.active-ports-card {
  border-color: rgba(242, 201, 76, 0.45);
  background: linear-gradient(
    160deg,
    rgba(22, 20, 14, 0.9) 0%,
    rgba(12, 18, 24, 1) 70%
  );
  text-align: left;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.active-ports-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 160px;
}

.active-ports-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.active-ports-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.active-port-item {
  min-height: 90px;
}

.lfa-card {
  width: 100%;
  min-height: 0;
  padding: 0.7rem 0.9rem;
  gap: 0.35rem;
  align-items: center;
  flex: 1 1 0;
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.media-3h-card {
  width: 100%;
  min-height: 0;
  padding: 0.7rem 0.9rem;
  gap: 0.35rem;
  align-items: center;
  flex: 1 1 0;
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.eficiencia-card {
  width: 100%;
  min-height: 0;
  padding: 0.7rem 0.9rem;
  gap: 0.35rem;
  align-items: center;
  flex: 1 1 0;
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.production-card--bottom {
  margin-top: 0;
}

.panel-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-card-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #d7f7ff;
  border: 1px solid rgba(77, 210, 255, 0.5);
  background: rgba(77, 210, 255, 0.12);
}

.panel-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-strong);
}

.panel-card-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.led-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  width: 100%;
}

.led-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(58, 71, 86, 0.6);
  background: #0c1218;
  min-height: 90px;
  text-align: center;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.led-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #2b3542;
  box-shadow: inset 0 0 0 2px #0a0f14;
}

.led-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.led-state {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #c6d1dd;
  text-transform: uppercase;
}

.porta-value {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8fa0b3;
  font-variant-numeric: tabular-nums;
}

.led-item.is-on .led-dot {
  background: var(--ok);
  box-shadow: 0 0 12px rgba(61, 220, 132, 0.7);
  animation: ledPulse 2.6s ease-in-out infinite;
}

.led-item.is-on {
  border: 2px solid rgba(61, 220, 132, 0.8);
  background: linear-gradient(
    140deg,
    rgba(61, 220, 132, 0.12) 0%,
    rgba(12, 18, 24, 1) 70%
  );
  box-shadow: 0 0 18px rgba(61, 220, 132, 0.25);
}

.led-item.is-on .led-state {
  color: #d7ffe7;
}

.led-item.is-off .led-state {
  color: #5f6b79;
}

.led-item.is-off {
  border-color: rgba(39, 51, 65, 0.7);
  background: #0a0f14;
}

.led-item.is-on .porta-value {
  color: #d7ffe7;
}

.led-item.is-off .porta-value {
  color: #5f6b79;
}

.footer-industrial {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  padding: 0.45rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: #bfbfbf;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.5px;
  user-select: none;
  text-align: center;
}

.footer-industrial--full {
  margin-top: auto;
}

.dashboard-page .footer-industrial--full {
  margin-top: 16px;
}

.link-footer {
  color: #5dc9c9;
  text-decoration: none;
}

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

@keyframes ledPulse {
  0% {
    box-shadow: 0 0 10px rgba(61, 220, 132, 0.5);
  }
  50% {
    box-shadow: 0 0 18px rgba(61, 220, 132, 0.9);
  }
  100% {
    box-shadow: 0 0 10px rgba(61, 220, 132, 0.5);
  }
}

@media (max-width: 992px) {
  .panel-meta {
    align-items: flex-start;
  }

  .meta-line--actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-report-trigger {
    width: 100%;
  }

  .panel-title {
    font-size: 1.7rem;
  }

  .production-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .diagnostic-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .diag-registros {
    width: 100%;
  }
}

@media (max-width: 768px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-y: auto;
  }

  .screen-page-shell,
  .screen-page-content,
  .home-shell,
  .teares-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .cadastro-overlay,
  .modal-backdrop {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    overflow-y: auto;
    align-items: flex-start;
    padding: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .modal-card,
  .cadastro-card {
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 24px);
    overflow: hidden;
    margin: 0 auto;
  }

  .modal-body,
  .cadastro-form {
    flex: 1 1 auto;
    max-height: 100vh;
    overflow-y: auto;
    padding-bottom: 80px;
    -webkit-overflow-scrolling: touch;
  }

  .modal-body .modal-label,
  .modal-form-grid .modal-label,
  .cadastro-field {
    width: 100%;
    margin-bottom: 12px;
  }

  .modal-actions,
  .cadastro-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    gap: 10px;
    padding: 10px;
    margin-top: 0;
    background: rgba(12, 20, 32, 0.88);
    backdrop-filter: blur(12px);
  }

  .modal-actions .btn-modal,
  .cadastro-actions .cadastro-btn {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
  }

  .empresa-card-header {
    padding: 1.15rem 1.1rem;
  }

  .empresa-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .empresa-actions .action-btn {
    flex: 1 1 140px;
    text-align: center;
  }

  .empresa-detail-card {
    margin: 0 0.8rem 0.8rem;
  }

  .empresa-users-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .empresa-users-header .action-btn {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .empresa-users-table.teares-table-wrapper {
    max-height: none;
    overflow: visible;
    border: none;
    background: transparent;
  }

  .empresa-users-table .teares-table,
  .empresa-users-table .teares-table tbody {
    display: block;
    width: 100%;
  }

  .empresa-users-table .teares-table thead {
    display: none;
  }

  .empresa-users-table .teares-table tbody tr {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(77, 210, 255, 0.14);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(16, 24, 33, 0.92) 0%, rgba(10, 15, 20, 0.96) 100%);
    box-shadow:
      0 12px 24px rgba(0, 0, 0, 0.22),
      inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  }

  .empresa-users-table .teares-table tbody td {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    width: 100%;
    padding: 0;
    border-bottom: none;
    color: #e4edf7;
  }

  .empresa-users-table .teares-table tbody td::before {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    content: "";
  }

  .empresa-users-table .teares-table tbody td:nth-child(1)::before {
    content: "Nome";
  }

  .empresa-users-table .teares-table tbody td:nth-child(2)::before {
    content: "Login";
  }

  .empresa-users-table .teares-table tbody td:nth-child(3)::before {
    content: "Permissão";
  }

  .empresa-users-table .teares-table tbody td:nth-child(4)::before {
    content: "Ações";
  }

  .empresa-users-table .teares-table tbody td:last-child {
    margin-top: 0.25rem;
  }

  .empresa-users-table .teares-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
  }

  .empresa-users-table .teares-actions .action-btn {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-height: 42px;
    text-align: center;
    justify-content: center;
  }

  .empresa-users-table .table-readonly {
    display: block;
    padding: 0.55rem 0 0.2rem;
    text-align: center;
  }

  .teares-list-card {
    padding: 1rem 0.9rem;
  }

  .teares-header,
  .dashboard-page .panel-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .teares-header .panel-title-row,
  .dashboard-page .panel-title-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
  }

  .teares-header .back-button,
  .dashboard-page .back-button {
    position: static;
    align-self: flex-start;
    margin: 0;
    width: auto;
    height: auto;
    min-height: 42px;
    padding: 0.6rem 0.9rem;
    gap: 6px;
    opacity: 0.8;
  }

  .back-button-text {
    display: inline;
    font-size: 14px;
    line-height: 1;
  }

  .teares-header .panel-title-group,
  .teares-header .panel-title-copy,
  .dashboard-page .panel-title-group {
    width: 100%;
    align-items: flex-start;
  }

  .teares-header .panel-title,
  .dashboard-page .panel-title {
    font-size: 1.6rem;
    line-height: 1.2;
    text-align: left;
    margin-bottom: 5px;
    word-break: normal;
    white-space: normal;
  }

  .teares-header .panel-kicker,
  .dashboard-page .panel-kicker {
    font-size: 0.82rem;
    line-height: 1.3;
    letter-spacing: 0.14em;
    opacity: 0.78;
    text-align: left;
    text-transform: none;
    word-break: normal;
    white-space: normal;
  }

  .dashboard-page .brand-logo {
    margin: 0;
  }

  .teares-list {
    gap: 1rem;
  }

  .tear-admin-card {
    width: 100%;
    padding: 1.15rem 1rem;
  }

  .tear-admin-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .tear-admin-main {
    flex: 1 1 auto;
  }

  .tear-admin-title {
    font-size: 1.05rem;
  }

  .tear-admin-kicker {
    font-size: 0.64rem;
    letter-spacing: 0.22em;
  }

  .tear-admin-meta {
    font-size: 0.8rem;
    gap: 0.35rem;
  }

  .tear-admin-actions {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    justify-content: stretch;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .tear-admin-actions .action-btn {
    width: 100%;
    min-height: 48px;
    padding: 0.85rem 1rem;
    font-size: 0.76rem;
  }

  .production-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: auto;
    align-items: stretch;
    justify-content: flex-start;
  }

  .lfa-card,
  .media-3h-card,
  .eficiencia-card {
    width: 100%;
    height: auto;
    min-height: unset;
    margin: 0;
    padding: 20px;
    border-radius: 18px;
    gap: 0.7rem;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .production-card--secondary {
    width: 100%;
    height: auto;
    min-height: unset;
    padding: 20px;
    border-radius: 18px;
    justify-content: center;
    align-items: center;
    gap: 0.7rem;
    text-align: center;
  }

  .lfa-card .production-card-title,
  .media-3h-card .production-card-title,
  .eficiencia-card .production-card-title {
    max-width: 90%;
    margin: 0 auto;
    font-size: 0.82rem !important;
    line-height: 1.35;
    letter-spacing: 0.16em;
    text-align: center;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .lfa-card .production-value--secondary,
  .media-3h-card .production-value--secondary,
  .eficiencia-card .production-value--secondary {
    font-size: clamp(2rem, 9vw, 2.5rem);
    line-height: 1.05;
    font-weight: 800;
    text-align: center;
    margin: 0;
  }

  .media-3h-card .production-value--secondary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
  }

  .media-3h-card .production-value--secondary span {
    display: block;
    margin-top: 0;
    font-size: 0.9rem !important;
    line-height: 1.1;
    letter-spacing: 0.08em;
  }

  .diag-registros {
    width: 100%;
    height: auto;
    min-height: unset;
    padding: 15px;
    border-radius: 18px;
    gap: 0.2rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow:
      0 12px 22px rgba(0, 0, 0, 0.32),
      0 0 14px rgba(77, 210, 255, 0.1);
  }

  .diag-registros-label {
    max-width: 90%;
    margin: 0 auto 0.18rem;
    font-size: 0.78rem;
    line-height: 1.35;
    letter-spacing: 0.16em;
    text-align: center;
  }

  .diag-registros-value {
    font-size: clamp(1.9rem, 8vw, 2.2rem);
    line-height: 1.05;
    font-weight: 800;
    text-align: center;
  }

  .diagnostic-grid {
    grid-template-columns: 1fr;
  }

  .led-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }

  .tick-label {
    font-size: 0.45rem;
  }

  .tick-label--y {
    font-size: 0.5rem;
  }

  .brand-logo {
    height: 26px;
  }
}

@media (max-width: 576px) {
  .panel-title {
    font-size: 1.5rem;
  }

  .led-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}
