* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #b88727;
  --primary-dark: #8c6518;
  --primary-light: #fff7e5;
  --background: #f4f6f8;
  --surface: #ffffff;
  --text: #1d2433;
  --text-light: #6f7785;
  --border: #e4e7ec;
  --danger: #d92d20;
  --success: #17803d;
  --warning: #b54708;
  --sidebar: #171a21;
}

body {
  font-family:
    Arial,
    Helvetica,
    sans-serif;
  color: var(--text);
  background: var(--background);
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* LOGIN */

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(
      120deg,
      rgba(23, 26, 33, 0.97),
      rgba(41, 45, 55, 0.93)
    );
}

.login-container {
  width: min(1100px, 100%);
  min-height: 100vh;
  margin: auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 420px;
  align-items: center;
  gap: 80px;
}

.login-brand {
  color: white;
  max-width: 580px;
}

.brand-badge {
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--primary);
  color: white;
  font-size: 25px;
  font-weight: bold;
}

.login-brand h1 {
  margin-bottom: 18px;
  font-size: 48px;
  line-height: 1.1;
}

.login-brand p {
  max-width: 520px;
  color: #d0d5dd;
  font-size: 18px;
  line-height: 1.7;
}

.login-card {
  padding: 38px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.login-header {
  margin-bottom: 30px;
}

.login-header h2 {
  margin-bottom: 8px;
  font-size: 27px;
}

.login-header p {
  color: var(--text-light);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  font-size: 15px;
  transition: 0.2s;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 135, 39, 0.15);
}

.form-error {
  min-height: 20px;
  margin-bottom: 8px;
  color: var(--danger);
  font-size: 14px;
}

.button-primary {
  width: 100%;
  min-height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: bold;
  transition: 0.2s;
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-auto {
  width: auto;
}

.button-secondary {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-weight: bold;
}

.button-secondary:hover {
  background: #f8f9fa;
}

.demo-access {
  margin-top: 25px;
  padding: 15px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #66490d;
  font-size: 13px;
}

/* DASHBOARD */

.dashboard-body {
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  height: 100vh;
  padding: 25px 18px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: white;
}

.sidebar-brand {
  padding: 0 7px 25px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  width: 43px;
  height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--primary);
  font-weight: bold;
}

.sidebar-brand div:last-child {
  display: flex;
  flex-direction: column;
}

.sidebar-brand strong {
  font-size: 16px;
}

.sidebar-brand span {
  margin-top: 3px;
  color: #98a2b3;
  font-size: 12px;
}

.sidebar-menu {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.menu-item {
  min-height: 46px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 9px;
  color: #c7cbd1;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}

.menu-item span {
  width: 25px;
  text-align: center;
}

.menu-item:hover,
.menu-item.active {
  background: rgba(184, 135, 39, 0.18);
  color: #ffd781;
}

.logout-button {
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: transparent;
  color: #d0d5dd;
  font-weight: bold;
}

.logout-button:hover {
  background: rgba(255, 255, 255, 0.07);
}

.dashboard-content {
  min-height: 100vh;
  margin-left: 260px;
}

.topbar {
  min-height: 82px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  background: white;
}

.topbar h1 {
  margin-bottom: 4px;
  font-size: 21px;
}

.topbar p {
  color: var(--text-light);
  font-size: 13px;
}

.menu-button {
  display: none;
  border: none;
  background: transparent;
  font-size: 24px;
}

.user-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: bold;
}

.user-area > div:last-child {
  display: flex;
  flex-direction: column;
}

.user-area strong {
  font-size: 13px;
}

.user-area span {
  margin-top: 3px;
  color: var(--text-light);
  font-size: 11px;
}

.dashboard-main {
  padding: 30px;
}

.welcome-card {
  min-height: 155px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 16px;
  background:
    linear-gradient(
      120deg,
      #22262f,
      #383d49
    );
  color: white;
}

.welcome-label {
  display: block;
  margin-bottom: 10px;
  color: #ffd781;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
}

.welcome-card h2 {
  margin-bottom: 10px;
  font-size: 26px;
}

.welcome-card p {
  color: #d0d5dd;
}

.summary-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.summary-card {
  min-height: 132px;
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
}

.summary-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: bold;
}

.summary-card div:last-child {
  display: flex;
  flex-direction: column;
}

.summary-card span {
  color: var(--text-light);
  font-size: 13px;
}

.summary-card strong {
  margin: 7px 0;
  font-size: 23px;
}

.summary-card small {
  color: var(--text-light);
  font-size: 11px;
}

.content-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.panel {
  padding: 23px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
}

.panel-header {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.panel-header h3 {
  margin-bottom: 5px;
  font-size: 17px;
}

.panel-header p {
  color: var(--text-light);
  font-size: 12px;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 13px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-light);
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
}

td {
  padding: 15px 10px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 13px;
}

.status {
  padding: 6px 9px;
  display: inline-block;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
}

.status-progress {
  background: #fff3d6;
  color: #8a5d00;
}

.status-waiting {
  background: #eaf2ff;
  color: #175cd3;
}

.status-finished {
  background: #e9f8ee;
  color: var(--success);
}

.service-summary {
  display: flex;
  flex-direction: column;
}

.service-item {
  padding: 17px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.service-item:last-child {
  border-bottom: none;
}

.service-item div {
  display: flex;
  flex-direction: column;
}

.service-item strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.service-item span {
  color: var(--text-light);
  font-size: 11px;
}

.service-item b {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* RESPONSIVO */

@media (max-width: 1100px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .login-container {
    padding: 25px;
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .login-brand {
    text-align: center;
  }

  .brand-badge {
    margin-right: auto;
    margin-left: auto;
  }

  .login-brand h1 {
    font-size: 36px;
  }

  .sidebar {
    left: -270px;
    transition: 0.3s;
  }

  .sidebar-open {
    left: 0;
  }

  .dashboard-content {
    margin-left: 0;
  }

  .menu-button {
    display: block;
  }

  .dashboard-main {
    padding: 20px;
  }

  .welcome-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .login-container {
    padding: 18px;
  }

  .login-card {
    padding: 25px;
  }

  .login-brand h1 {
    font-size: 29px;
  }

  .topbar {
    padding: 0 18px;
  }

  .topbar > div:nth-child(2) {
    display: none;
  }

  .user-area {
    margin-left: auto;
  }
}
/* RADAR DE GRANIZO */

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.button-radar {
  min-height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffd781;
  border-radius: 9px;
  color: #ffd781;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: 0.2s;
}

.button-radar:hover {
  background: rgba(255, 215, 129, 0.12);
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.radar-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 13px;
  font-weight: bold;
}

.radar-status-point {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
}

.radar-hero {
  min-height: 180px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 16px;
  background:
    linear-gradient(
      120deg,
      #22262f,
      #383d49
    );
  color: white;
}

.radar-hero h2 {
  margin-bottom: 10px;
  font-size: 27px;
}

.radar-hero p {
  max-width: 650px;
  color: #d0d5dd;
  line-height: 1.6;
}

.radar-symbol {
  width: 85px;
  height: 85px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffd781;
  border-radius: 50%;
  color: #ffd781;
  font-size: 40px;
}

.radar-search-panel {
  margin-top: 24px;
}

.radar-form {
  display: grid;
  grid-template-columns: 1fr 120px 180px;
  align-items: end;
  gap: 15px;
}

.radar-form .form-group {
  margin-bottom: 0;
}

.radar-search-button {
  height: 48px;
}

.radar-development-message {
  margin-top: 15px;
  color: var(--text-light);
  font-size: 12px;
}

.empty-radar {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--text-light);
  text-align: center;
}

.empty-radar-icon {
  width: 65px;
  height: 65px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 28px;
}

.empty-radar h4 {
  margin-bottom: 8px;
  color: var(--text);
}

.risk-list {
  display: flex;
  flex-direction: column;
}

.risk-item {
  padding: 17px 0;
  display: flex;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--border);
}

.risk-item:last-child {
  border-bottom: none;
}

.risk-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.risk-item strong {
  font-size: 13px;
}

.risk-item small {
  color: var(--text-light);
}

.risk-indicator {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  border-radius: 50%;
}

.risk-low {
  background: #36a269;
}

.risk-moderate {
  background: #e6a700;
}

.risk-high {
  background: #e66d17;
}

.risk-critical {
  background: #d92d20;
}

@media (max-width: 800px) {
  .welcome-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .button-radar {
    width: 100%;
  }

  .radar-form {
    grid-template-columns: 1fr;
  }

  .radar-symbol {
    display: none;
  }

  .radar-status {
    font-size: 11px;
  }
}
/* RESULTADO DO RADAR */

.radar-result {
  width: 100%;
  text-align: left;
}

.radar-result-header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}

.radar-result-header span {
  color: var(--text-light);
  font-size: 12px;
}

.radar-result-header h4 {
  margin-top: 5px;
  color: var(--text);
  font-size: 19px;
}

.radar-risk-badge {
  padding: 9px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  color: var(--text);
  font-size: 12px;
  font-weight: bold;
}

.radar-result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.radar-data-item {
  min-height: 90px;
  padding: 15px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8f9fa;
}

.radar-data-item span {
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 11px;
}

.radar-data-item strong {
  color: var(--text);
  font-size: 15px;
}

.radar-disclaimer {
  margin-top: 18px;
  padding: 13px;
  border-radius: 9px;
  background: var(--primary-light);
  color: #66490d;
  font-size: 12px;
  line-height: 1.5;
}

.radar-search-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 1000px) {
  .radar-result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .radar-result-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .radar-result-grid {
    grid-template-columns: 1fr;
  }
}