*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: #1a1a2e;
  background: #f0f4f8;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOGIN & OTP ===== */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e0eaff 0%, #f0f4f8 60%);
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(59,130,246,.10), 0 1px 4px rgba(0,0,0,.06);
  text-align: center;
}

.login-logo { margin-bottom: 1.25rem; display: flex; justify-content: center; }
.otp-icon   { font-size: 2.5rem; }

.login-card h1 {
  font-size: 1.5rem; font-weight: 700; color: #0f172a;
  margin-bottom: .25rem; letter-spacing: -.02em;
}
.login-card .subtitle {
  color: #64748b; font-size: .875rem;
  margin-bottom: 1.75rem; line-height: 1.5;
}
.login-card .subtitle strong { color: #1e293b; }

.alert {
  background: #fef2f2; color: #b91c1c;
  border: 1px solid #fecaca;
  padding: .7rem 1rem; border-radius: 8px;
  font-size: .875rem; margin-bottom: 1.25rem; text-align: left;
}

form label {
  display: block; font-size: .78rem; font-weight: 600;
  color: #475569; text-align: left; margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: .04em;
}
form label input {
  display: block; width: 100%; margin-top: .4rem;
  padding: .7rem 1rem; border: 1.5px solid #e2e8f0;
  border-radius: 8px; font-size: .95rem; color: #0f172a;
  background: #f8fafc; transition: border-color .15s, box-shadow .15s;
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
form label input:focus {
  outline: none; border-color: #3b82f6; background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Champ OTP centré, grands caractères */
.otp-input {
  text-align: center !important;
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  letter-spacing: .35em !important;
}

form button {
  width: 100%; padding: .8rem; background: #3b82f6;
  color: #fff; border: none; border-radius: 8px;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  margin-top: .5rem; letter-spacing: .01em;
  transition: background .15s, transform .1s;
}
form button:hover  { background: #2563eb; }
form button:active { transform: scale(.98); }

.back-link {
  display: inline-block; margin-top: 1.25rem;
  font-size: .82rem; color: #94a3b8; text-decoration: none;
}
.back-link:hover { color: #64748b; }

/* ===== DASHBOARD ===== */
.dash-body { display: flex; height: 100vh; overflow: hidden; background: #0f172a; }

.sidebar {
  width: 230px; min-width: 230px; background: #1e293b;
  color: #e2e8f0; display: flex; flex-direction: column;
  border-right: 1px solid #334155;
}
.sidebar-header { padding: 1.25rem 1rem 1rem; border-bottom: 1px solid #334155; }
.sidebar-title  { font-size: 1rem; font-weight: 700; color: #f1f5f9; margin-bottom: .4rem; }
.sidebar-user   { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: #94a3b8; }
.user-dot       { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }

.sidebar-nav    { list-style: none; flex: 1; padding: .75rem 0; overflow-y: auto; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: .6rem 1rem; color: #94a3b8; text-decoration: none;
  font-size: .875rem; border-left: 3px solid transparent;
  transition: background .12s, color .12s;
}
.nav-link:hover  { background: #273548; color: #e2e8f0; }
.nav-link.active { background: #1d3a5f; color: #60a5fa; border-left-color: #3b82f6; font-weight: 600; }
.nav-icon { font-size: 1rem; width: 22px; text-align: center; }

.sidebar-footer { padding: 1rem; border-top: 1px solid #334155; }
.logout-link    { display: block; color: #64748b; text-decoration: none; font-size: .82rem; }
.logout-link:hover { color: #f87171; }

.content        { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.content-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.25rem; background: #1e293b;
  border-bottom: 1px solid #334155; min-height: 48px;
}
.content-title  { font-size: .95rem; font-weight: 600; color: #e2e8f0; }
.open-grafana   { font-size: .78rem; color: #60a5fa; text-decoration: none; opacity: .8; }
.open-grafana:hover { opacity: 1; }

.iframe-wrapper       { flex: 1; overflow: hidden; }
.iframe-wrapper iframe { width: 100%; height: 100%; border: none; display: block; }
