html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.nav-style {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
}

.tab-btn {
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tab-btn-active {
  text-decoration: none;
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
  color: #111827;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.btn-outline {
  background: none;
  border: 1px solid #d1d5db;
  color: #374151;
  padding: 0.5rem 1rem;
  height: 36px;
  gap: 0.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 0.5rem;
}

.btn-icon-sm {
  border: none;
  background: none;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-icon-sm:hover {
  background-color: #f0f4f8;;
}

.btn-outline:hover {
  background-color: #f9fafb;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f4f7fb;
  color: #172033;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1rem;
  color: #5887BD !important;
}

.dashboard-shell {
  max-width: 1120px;
  margin: 3vh auto;
}

.dashboard-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.dashboard-kicker,
.metric-label,
.metric-meta {
  color: #607086;
  margin: 0;
}

.dashboard-kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-header h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  margin: 4px 0 0;
}

.connection-pill {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
  padding: 0.4rem 0.9rem;
}

.status-dot {
  background: #a5afbd;
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.connection-pill.connected .status-dot {
  background: #14a46c;
}

.connection-pill.connecting .status-dot {
  background: #d99310;
}

.connection-pill.disconnected .status-dot {
  background: #c23b3b;
}

.dashboard-grid {
  display: flex;
  gap: 18px;
}

.metric-card,
.updates-panel {
  width: 30%;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
  padding: 1rem 2rem;
}

.settings-panel {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.08);
  padding: 1rem 2rem;
  margin: 2rem 3rem;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.primary-metric .metric-label,
.primary-metric .metric-meta {
  color: #6b6b6b;
}

.columns {
  display: flex; 
  gap: 1rem;
}

.accent-metric {
  border-left: 5px solid #5887BD;
}

.metric-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-value {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  margin: 20px 0;
  overflow-wrap: anywhere;
  color: #0a0a0a;
}

.metric-sub {
  font-size: 11px;
  color: #6b6b6b;
  margin: 0;
}

.metric-meta {
  font-size: 0.7rem;
}

.endpoint-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 20px 0 10px;
}

.updates-panel {
  margin-top: 18px;
  width: 100%;
}

.updates-panel input,select {
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}


.settings-panel input,select {
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.udp-result {
  font-size: 11px;
  color: #0a0a0a;
}

.panel-heading {
  align-items: center;
  display: flex;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
}

.panel-heading h2 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0a0a0a;
  margin: 0;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #5887BD;
}

.live-badge__dot--on {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5887BD;
  opacity: 0.4;
  animation: pulsing 2s infinite ease-in-out;
}

@keyframes pulsing {
    0%, 100% {
        opacity: 1.0;
    }
    50% {
        opacity: 0.5;
    }
}


.update-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  max-height: 360px;
  overflow: auto;
  padding: 0;
}

.update-list li {
  background: #f7f9fc;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.update-time {
  color: #6b6b6b;
  font-size: 10px;
  font-weight: 700;
}

.update-payload {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.geozone-row {
  display: flex;
  align-items: center;
  justify-content: space-between; 
  padding: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.geozone-row__name {
  font-size: 11px;
  color: #0a0a0a;
  width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.geozone-row__vehicle {
  font-size: 11px;
  color: #0a0a0a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  background-color: #f7f9fc;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  padding: 0.5rem;
}

/* LOGGER */
.tab-nav {
  padding: 0.5rem 1rem;
  border-right: 1px solid #eee;
  cursor: pointer;
}

.tab-selected {
  background-color: #f0f4f8;
  color: #111827;
  font-weight: 700;
}

.search-panel {
  margin: 10px; 
  background-color: #F8F9FC; 
  padding: 1rem; 
  border-radius: 8px;
  overflow-y: auto;
  max-height: 70vh;
}

.searchItem {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  padding: 0.75rem 0; 
  border-bottom: 1px solid #eee;
}

.searchItem:hover {
  background-color: #f0f4f8;
}

.highlight{
    background:#fff3a0;
}

.table tr:hover {
  background-color: #fafafa;
}
.explorer-header {
  padding: 6px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #fafafa;
}

.explorer-header__title {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b6b6b;
}

.explorer-row__label {
  font-size: 12px;
  color: #0a0a0a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.explorer-file {
  border-radius: 8px;
  margin: 1rem;
  max-height: 80vh;
  padding: 1rem;
  background: #f7f9fc;
  overflow: auto;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.back-btn:hover {
  color: #5887BD;
}

/* LOGIN PAGE */

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

.main-content {
  background: linear-gradient(135deg, #1E4DB7 0%, #069BEB 100%);
  flex: 1;
  display: none;
}

.login-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-card {
  z-index: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-header h1 {
  margin: 0.5rem 0 1.5rem 0;
  color: #1F2A35;
  font-size: 1.5rem;
  font-weight: 600;
}

.logo {
  max-width: 150px;
  height: auto;
  margin-bottom: 1rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-weight: 500;
  font-size: 0.9rem;
}

.login-form input {
  width: 100%;
  padding: 0.3rem;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.login-form input:focus {
  outline: none;
  border-color: #1f2a35;
  box-shadow: 0 0 0 3px rgba(31, 42, 53, 0.1);
}

.login-btn {
  background: #5887BD !important;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 0.5rem;
}

.submit-btn, .logout-btn {
  background: #eac644 !important;
  color: black !important;
  text-decoration: none;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 0.5rem;
}

.login-btn:hover {
  background: #16202a;
}

.login-btn:active {
  transform: translateY(1px);
}

.icon {
  font-size: 1.2rem;
  font-weight: bold;
}

.login-footer {
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid #ecf0f1;
}

.error-message {
  color: #e74c3c !important;
  margin: 0 0 1rem 0 !important;
  font-weight: 500;
}

.login-footer p {
  color: #7f8c8d;
  margin: 0.5rem 0 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.login-footer a {
  color: #1F2A35;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

.settings-form {
  display: flex; 
  padding: 1rem 2rem;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: center;  /* Aligns the child horizontally in the center */
  align-items: center;      /* Aligns the child vertically in the center */
  width: 100%;      
}

.form-label {
  font-size: 11px;
}


@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .login-header h1 {
    font-size: 1.75rem;
  }
}


@media (max-width: 820px) {
  .dashboard-header,
  .panel-heading, .columns {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-heading {
    flex-direction: row;
  }

  .endpoint-row {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    flex-direction: column;
  }

  .metric-card {
    width: 100%;
  }

  .connection-pill,
  .endpoint-row .btn {
    width: 100%;
  }
}
