* {
  box-sizing: border-box;
}

:root {
  --red: #e30613;
  --red-dark: #bb0010;
  --bg: #f5f6f8;
  --white: #ffffff;
  --text: #17181a;
  --muted: #747980;
  --border: #e4e6e9;
  --green: #16834a;
  --green-bg: #e7f6ed;
  --yellow: #946200;
  --yellow-bg: #fff4d8;
}

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

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, #fff 0, #f5f6f8 45%);
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: white;
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.08);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 36px;
}

.brand h1 {
  margin: 0;
  font-size: 25px;
}

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

.brand-mark {
  width: 52px;
  height: 52px;
  background: var(--red);
  color: white;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: bold;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0 13px;
  outline: none;
  font-size: 15px;
  margin-bottom: 18px;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227,6,19,.08);
}

.primary-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: var(--red);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn:hover {
  background: var(--red-dark);
}

.secondary-btn {
  border: 1px solid var(--border);
  background: white;
  padding: 9px 15px;
  border-radius: 8px;
  cursor: pointer;
}

.error-text {
  color: var(--red);
  min-height: 20px;
  font-size: 13px;
  margin-bottom: 8px;
}

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

.sidebar {
  width: 230px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 35px;
  padding: 0 8px;
}

.nav-item {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  padding: 12px;
  text-align: left;
  border-radius: 9px;
  cursor: pointer;
  color: #555;
  margin-bottom: 5px;
}

.nav-item.active {
  background: #fff0f1;
  color: var(--red);
  font-weight: 700;
}

.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  color: var(--muted);
}

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

.topbar {
  height: 82px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar h2 {
  margin: 0 0 3px;
  font-size: 20px;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 18px;
}

.user-area div {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.user-area span {
  color: var(--muted);
  font-size: 12px;
}

.content {
  max-width: 1250px;
  margin: auto;
  padding: 30px;
}

.page-title {
  margin-bottom: 22px;
}

.page-title h3 {
  margin: 0 0 5px;
  font-size: 24px;
}

.page-title p {
  color: var(--muted);
  margin: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  background: white;
  padding: 21px;
  border-radius: 13px;
  border: 1px solid var(--border);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  font-size: 23px;
  margin-top: 9px;
}

.panel-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 22px;
  margin-bottom: 22px;
}

.panel-header h3 {
  margin: 0 0 3px;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-box {
  margin: 20px 0;
  position: relative;
}

.search-box span {
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--muted);
}

.search-box input {
  padding-left: 38px;
  margin: 0;
}

.customer-list {
  display: flex;
  flex-direction: column;
}

.customer-row {
  border-top: 1px solid var(--border);
  padding: 16px 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.customer-row strong {
  display: block;
}

.customer-row small {
  color: var(--muted);
}

.open-customer {
  border: 1px solid var(--border);
  background: white;
  padding: 8px 13px;
  border-radius: 7px;
  cursor: pointer;
}

.open-customer:hover {
  border-color: var(--red);
  color: var(--red);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.detail-header h3 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
}

.badge.online {
  color: var(--green);
  background: var(--green-bg);
}

.badge.attention {
  color: var(--yellow);
  background: var(--yellow-bg);
}

.badge.critical {
  color: var(--red);
  background: #fff0f1;
}

.badge.neutral {
  color: #666;
  background: #eee;
}

.section-title {
  margin: 28px 0 12px;
  font-size: 13px;
  font-weight: bold;
  color: #555;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.info-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.info-item span,
.resource-grid span {
  color: var(--muted);
  font-size: 12px;
}

.info-item strong,
.resource-grid strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wifi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.wifi-card {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 17px;
}

.wifi-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.wifi-card label {
  color: var(--muted);
  margin: 0 0 6px;
}

.wifi-value {
  font-weight: bold;
  font-size: 17px;
}

.action-row {
  display: flex;
  gap: 8px;
  margin-top: 17px;
}

.action-row button,
.reboot-btn {
  border: 1px solid var(--border);
  background: #f8f8f8;
  padding: 9px 12px;
  border-radius: 7px;
}

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

.resource-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.resource-grid > div {
  border: 1px solid var(--border);
  padding: 14px;
  border-radius: 10px;
}

.danger-actions {
  margin-top: 25px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .sidebar {
    width: 180px;
  }

  .stats,
  .info-grid,
  .resource-grid {
    grid-template-columns: 1fr 1fr;
  }

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 25, .48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 22px 70px rgba(0,0,0,.20);
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff0f1;
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 17px;
}

.modal-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.modal-card > p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-customer {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 13px;
}

.modal-customer span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.modal-timer {
  font-size: 13px;
  margin: 14px 0;
}

.modal-warning {
  background: #fff7df;
  color: #785600;
  border-radius: 9px;
  padding: 11px;
  font-size: 12px;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-reboot-btn {
  border: 0;
  background: var(--red);
  color: white;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: bold;
}

.confirm-reboot-btn:disabled {
  background: #c8c8c8;
}

.reboot-btn:not(:disabled) {
  background: white;
  color: var(--red);
  border-color: #f1b4b8;
  cursor: pointer;
}

/* Campo de senha com botão visualizar */
.password-eye-wrapper {
  position: relative;
  width: 100%;
}

.password-eye-wrapper input {
  width: 100%;
  padding-right: 52px !important;
  box-sizing: border-box;
}

.password-eye-button {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #68707c;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-eye-button:hover {
  color: #111827;
  background: #f1f3f5;
  border-radius: 8px;
}

.password-eye-button svg {
  width: 21px;
  height: 21px;
}



/* ANETBW OPERATION STATUS COLORS */

.modal-warning.status-pending {
  background: #fff7df;
  color: #785600;
  border: 1px solid #e4c15d;
}

.modal-warning.status-success {
  background: #eaf8ef;
  color: #17643a;
  border: 1px solid #75c58e;
}

.modal-warning.status-error {
  background: #fff0f0;
  color: #9f2028;
  border: 1px solid #e0969b;
}

.modal-warning.status-pending::before {
  content: "⏳ ";
}

.modal-warning.status-success::before {
  content: "✓ ";
}

.modal-warning.status-error::before {
  content: "⚠ ";
}


.connected-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.host-list {
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
}

.host-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}

.host-row:last-child {
  border-bottom: 0;
}

.host-main {
  min-width: 0;
}

.host-main strong {
  display: block;
  overflow-wrap: anywhere;
}

.host-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.host-connection {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.host-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 650px) {
  .host-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}


/* ANETBW PING SUCCESS */
.modal-warning.success {
  background: #e9f7ee;
  border-color: #9ad5ab;
  color: #176b34;
}


.activity-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.activity-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.activity-filters label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.activity-filters select,
.activity-filters input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font: inherit;
}

.activity-card {
  padding: 0;
  overflow: hidden;
}

.activity-status {
  padding: 16px 20px;
  color: var(--muted);
  font-size: 13px;
}

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

.activity-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.activity-table th,
.activity-table td {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.activity-table th {
  color: var(--muted);
  background: var(--bg);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.activity-table tbody tr:hover {
  background: #fafbfc;
}

.activity-result {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.activity-result.completed {
  color: var(--green);
  background: var(--green-bg);
}

.activity-result.failed {
  color: var(--red-dark);
  background: #fff0f0;
}

.activity-result.unverified {
  color: var(--muted);
  background: #f1f3f5;
}

.activity-empty {
  padding: 28px 20px !important;
  color: var(--muted);
  text-align: center !important;
}

@media (max-width: 760px) {
  .activity-title {
    flex-direction: column;
  }

  .activity-title button {
    width: 100%;
  }

  .activity-filters {
    grid-template-columns: 1fr;
  }
}

/* ANETBW ACTIVITY SUMMARY */

.activity-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.activity-summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}

.activity-summary-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.activity-summary-card strong {
  display: block;
  color: var(--text);
  font-size: 26px;
  line-height: 1.1;
}

.activity-customer-link {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1665d8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.activity-customer-link:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .activity-summary {
    grid-template-columns: 1fr;
  }
}

/* ANETBW NOC */

.noc-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

#nocOnline {
  color: var(--green);
}

#nocOffline {
  color: var(--red-dark);
}

#nocAttention {
  color: #b26a00;
}

#nocUnmatched {
  color: var(--muted);
}

@media (max-width: 1000px) {
  .noc-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .noc-summary {
    grid-template-columns: 1fr;
  }
}
