:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 20px 45px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  text-decoration: none;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: white;
  padding: 24px;
  transition: transform 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-sub {
  margin-top: 6px;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 30px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu a {
  color: #cbd5e1;
  padding: 14px 16px;
  border-radius: 14px;
  transition: 0.2s ease;
  border: 1px solid transparent;
  font-weight: 500;
}

.menu a:hover,
.menu a.active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.10);
}

.sidebar-signature {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #cbd5e1;
  font-size: 13px;
}

.sidebar-signature strong {
  color: #ffffff;
}

.sidebar-signature a {
  color: #7dd3fc;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-title h1 {
  margin: 0;
  font-size: 28px;
}

.topbar-title p {
  margin: 4px 0 0;
  color: var(--muted);
}

.hamburger {
  display: none;
  border: none;
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
}

.user-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

.user-box span {
  color: var(--muted);
}

.content {
  padding: 24px;
  padding-bottom: 90px;
}

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

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

.card h3,
.panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.metric {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.ok {
  background: #dcfce7;
  color: #166534;
}

.low {
  background: #fef3c7;
  color: #92400e;
}

.danger {
  background: #fee2e2;
  color: #991b1b;
}

.info {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.chart {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 220px;
}

.bar-wrap {
  flex: 1;
  text-align: center;
}

.bar {
  width: 100%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #60a5fa, #1d4ed8);
}

.bar-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

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

.list-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.single-column {
  grid-template-columns: 1fr;
}

input,
select,
button {
  font-size: 14px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  outline: none;
}

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

.btn {
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.flash-area {
  padding: 16px 24px 0;
}

.flash {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.flash-success {
  background: #dcfce7;
  color: #166534;
}

.flash-danger {
  background: #fee2e2;
  color: #991b1b;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.78)),
    url('../img/login-cover.jpg') no-repeat center center / cover;
  padding: 20px;
  position: relative;
}

.auth-flash {
  position: absolute;
  top: 20px;
  width: min(500px, calc(100% - 40px));
}

.login-wrapper {
  width: 100%;
  max-width: 440px;
}

.professional-login {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-badge {
  display: inline-block;
  margin-bottom: 14px;
  background: rgba(125, 211, 252, 0.14);
  color: #bae6fd;
  border: 1px solid rgba(125, 211, 252, 0.28);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.professional-login h1 {
  margin: 0;
  font-size: 32px;
  color: #ffffff;
}

.professional-login p {
  margin: 8px 0 0;
  color: #cbd5e1;
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-header h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #ffffff;
}

.login-header span {
  color: #cbd5e1;
  font-size: 14px;
}

.professional-login input {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 14px 16px;
}

.professional-login input::placeholder {
  color: #cbd5e1;
}

.professional-login input:focus {
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.10);
}

.professional-login .btn-primary {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
}

.login-signature {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: #cbd5e1;
}

.login-signature a,
.system-signature a {
  color: #7dd3fc;
}

.system-signature {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  text-align: center;
}

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

  .hamburger {
    display: inline-block;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 999;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar {
    padding: 16px;
  }

  .content {
    padding: 16px;
    padding-bottom: 90px;
  }

  .topbar-title h1 {
    font-size: 22px;
  }

  .user-box {
    display: none;
  }

  .system-signature {
    width: calc(100% - 24px);
    bottom: 10px;
    font-size: 12px;
  }
}

@media (max-width: 520px) {
  .professional-login {
    padding: 24px 18px;
  }

  .professional-login h1 {
    font-size: 28px;
  }

  .login-header h2 {
    font-size: 22px;
  }
}

.logo-amarela {
    color: #facc15; /* amarelo profissional */
    font-weight: 700;
}

.logo-amarela {
    color: #facc15;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(250, 204, 21, 0.4);
}