:root{
  --teal:#008080;
  --teal-dark:#006666;
  --ink:#0f172a;
  --muted:#667085;
  --line:#1f2933;
  --bg-surface:#020617;
  --bg-main:#020617;
  --card:#0b1120;
  --shadow:0 18px 45px rgba(15,23,42,.55);
  --red:#f97373;
  --yellow:#facc15;
  --green:#4ade80;
}

/* ---------- App shell ---------- */

body.app-body{
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1000px 600px at -20% 0, rgba(0,128,128,.35), transparent 55%),
    radial-gradient(800px 500px at 120% 0, rgba(56,189,248,.35), transparent 55%),
    #020617;
  color: #e5e7eb;
}

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

/* ---------- Sidebar ---------- */

.app-sidebar{
  width: 260px;
  min-height: 100vh;
  padding: 18px 16px 20px;
  background:
    radial-gradient(600px 400px at 0 0, rgba(125, 225, 218, .14), transparent 60%),
    radial-gradient(700px 400px at 100% 0, rgba(14, 165, 233, .18), transparent 65%),
    #020617;
  border-right: 1px solid rgba(148, 163, 184, .25);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-brand{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.sidebar-logo{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 18px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  box-shadow: 0 0 0 1px rgba(148,163,184,.25),
              0 18px 40px rgba(8,47,73,.72);
  color: #e0f2f1;
}

.sidebar-brand-text{
  display:flex;
  flex-direction:column;
  gap: 1px;
}
.brand-title{
  font-size: 15px;
  font-weight: 700;
  color:#e5e7eb;
}
.brand-subtitle{
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.sidebar-user{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius: 12px;
  background: rgba(15,23,42,.8);
  box-shadow: 0 10px 26px rgba(15,23,42,.55);
  border:1px solid rgba(148,163,184,.35);
}

.user-avatar{
  width:34px;height:34px;
  border-radius:999px;
  display:grid;place-items:center;
  background: radial-gradient(circle at 0 0, #a5f3fc, #0e7490);
  color:#0b1120;
  font-weight:700;
  font-size: 15px;
}
.user-meta{
  display:flex;
  flex-direction:column;
}
.user-name{
  font-size:14px;
  font-weight:600;
  color:#e5e7eb;
}
.user-role{
  font-size:12px;
  color:#9ca3af;
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-top:4px;
  font-size: 14px;
}

.nav-section-label{
  margin-top:10px;
  margin-bottom:4px;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#6b7280;
}

.nav-link{
  display:flex;
  align-items:center;
  gap:8px;
  padding:7px 9px;
  border-radius:10px;
  color:#cbd5f5;
  text-decoration:none;
  position:relative;
  transition: background .15s ease, color .15s ease, transform .06s ease;
}

.nav-link .nav-icon{
  width:18px;
  text-align:center;
  opacity:.85;
}
.nav-link .nav-text{
  flex:1;
  white-space:nowrap;
  text-overflow:ellipsis;
  overflow:hidden;
}

.nav-link::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background: linear-gradient(90deg, rgba(45,212,191,.16), rgba(37,99,235,.08));
  opacity:0;
  transition: opacity .15s ease;
  pointer-events:none;
}

.nav-link:hover{
  color:#e5e7eb;
  background: rgba(15,23,42,.75);
  transform: translateY(-1px);
}
.nav-link:hover::before{
  opacity:1;
}

.nav-link.is-active{
  color:#e5e7eb;
  background: linear-gradient(135deg, rgba(34,197,184,.25), rgba(37,99,235,.30));
  box-shadow: 0 10px 26px rgba(15,23,42,.65);
}
.nav-link.is-active::before{
  opacity:0; /* gradient already on main background */
}
.nav-link-quiet{
  margin-top:4px;
  font-size:13px;
  color:#9ca3af;
  background: transparent;
  border-radius:8px;
}
.nav-link-quiet:hover{
  background: rgba(15,23,42,.85);
  color:#e5e7eb;
}

.sidebar-spacer{
  flex:1;
}

/* ---------- Main area ---------- */

.app-main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  background:
    radial-gradient(1200px 600px at 50% -25%, rgba(148,224,239,.26), transparent 70%),
    #020617;
}

/* Slim top area with contextual tabs */
.app-header{
  padding: 10px 24px 8px;
  border-bottom: 1px solid rgba(148,163,184,.35);
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.78));
  position: sticky;
  top: 0;
  z-index: 40;
}

/* Re-style sub-nav for the new header */
.app-header .sub-nav{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:4px 0;
  background: transparent;
}
.app-header .sub-nav a{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.45);
  color:#cbd5f5;
  font-size:12px;
  text-decoration:none;
  background: radial-gradient(circle at 0 0, rgba(56,189,248,.24), transparent 55%);
}
.app-header .sub-nav a:hover{
  background: rgba(15,23,42,.9);
  border-color: rgba(226,232,240,.9);
  color:#e5e7eb;
}

/* Page wrapper inside app-main; works with your existing pages */
.page-wrap{
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px) 32px;
}

/* Modern card look for dashboards & modules */
.card{
  background: var(--card);
  border-radius: 18px;
  border: 1px solid rgba(148,163,184,.32);
  box-shadow: var(--shadow);
  padding: 16px 16px 14px;
  color:#e5e7eb;
}

.dash-grid{
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items:start;
}

/* Headings inside cards */
.section-title{
  font-size: 15px;
  font-weight: 700;
  color:#e5e7eb;
  margin:0;
}

.card-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin:-2px 0 10px;
}
.card-head .muted,
.card-head .aside{
  color:#9ca3af;
  font-size: 13px;
  text-decoration:none;
}
.card-head .aside:hover{
  text-decoration:underline;
}

/* Lists */
.list{
  list-style:none;
  margin:0;
  padding:0;
}
.list li{
  display:grid;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:12px;
  padding:9px 0;
  border-bottom:1px solid rgba(30,64,175,.45);
}
.list li:last-child{
  border-bottom:none;
}
.list li:hover{
  background: radial-gradient(900px 300px at 0 0, rgba(56,189,248,.12), transparent 70%);
}

.label{
  color:#e5e7eb;
  font-weight:500;
  font-size: 14px;
}
.value{
  color:#9ca3af;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
}

/* Status dots & badges */
.dot{
  width:8px;
  height:8px;
  border-radius:999px;
  display:inline-block;
  margin-right:8px;
}
.dot.red{ background:#ef4444; }
.dot.yellow{ background:#f59e0b; }
.dot.green{ background:#10b981; }

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  line-height:1;
}
.badge.neutral{
  background:rgba(15,23,42,.9);
  color:#e5e7eb;
  border:1px solid rgba(148,163,184,.5);
}
.badge.red{
  background:rgba(248,113,113,.2);
  color:#fecaca;
}
.badge.yellow{
  background:rgba(250,204,21,.18);
  color:#fef9c3;
}
.badge.green{
  background:rgba(34,197,94,.18);
  color:#bbf7d0;
}

/* KPIs */
.kpi{
  font-size: 26px;
  font-weight: 800;
  color:#f9fafb;
  margin:6px 0 2px;
}
.kpi-sub{
  color:#9ca3af;
  font-size:13px;
}

/* Links */
.link-muted{
  color:#9ca3af;
  text-decoration:none;
}
.link-muted:hover{
  text-decoration:underline;
  color:#e5e7eb;
}
.link-brand{
  color:#7de1da;
  text-decoration:none;
  font-weight:600;
}
.link-brand:hover{
  text-decoration:underline;
}


body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
}

header {
    background-color: #008080; /* Lectrix Teal */
    color: white;
}

.top-nav, .sub-nav {
    display: flex;
    gap: 20px;
    padding: 12px 24px;
    background-color: #008080;
}

.sub-nav {
    background-color: #006666;
}

.top-nav a, .sub-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.top-nav a:hover, .sub-nav a:hover {
    text-decoration: underline;
}

h2 {
    margin: 24px;
    color: #333;
}

.container {
    padding: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

th, td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

a.button {
    background-color: #008080;
    color: white;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

a.button:hover {
    background-color: #006666;
}

th a {
    text-decoration: underline;
    cursor: pointer;
}

/* Only style generic text inputs inside normal pages */
.container input[type="text"],
table input[type="text"],
.filters input[type="text"] {
  padding: 6px;
  width: 200px;
  font-size: 14px;
}



/* ---------- Auth (Login) ---------- */
:root{
  --teal: #008080;     /* existing brand teal */
  --teal-dark:#006666; /* existing darker teal */
  --ink:#1f2a37;
  --ink-2:#334155;
  --bg:#f5f7f9;
  --card:#ffffff;
  --line:#e5e7eb;
  --danger:#b91c1c;
}

body.auth-body{ background: radial-gradient(1200px 600px at 10% -10%, #e6fffd 0, transparent 60%), var(--bg); }

.auth-wrap{
  min-height: 100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: clamp(16px, 4vw, 40px);
}

.auth-card{
  width: min(440px, 92vw);
  background: var(--card);
  border:1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.auth-brand{
  text-align:center;
  margin-bottom: 18px;
}
.auth-logo{
  width:56px;height:56px;border-radius:12px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  display:inline-grid;place-items:center;
  color:#fff;font-weight:800;font-size:22px;letter-spacing:.5px;
  margin: 0 auto 10px auto;
}
.auth-brand h1{
  font-size: clamp(22px, 2.4vw, 26px);
  color: var(--ink); margin: 6px 0 2px;
}
.auth-subtitle{
  color: #64748b; margin:0 0 6px;
}

.auth-alert{
  background: #fee2e2;
  color:#7f1d1d;
  border:1px solid #fecaca;
  border-radius:10px;
  padding:10px 12px;
  margin: 10px 0 16px;
}

.auth-form{ display:block; }
.auth-label{
  display:block;
  font-weight:600;
  color: var(--ink);
  margin: 14px 0 6px;
}


.auth-pw-row{
  display:flex; align-items:center; justify-content:space-between;
  margin-top: 14px;
}
.pw-toggle{
  border:none; background:transparent; color: var(--teal);
  font-weight:600; cursor:pointer; padding: 6px 0;
}
.pw-toggle:hover{ text-decoration: underline; }

.auth-meta{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin: 12px 0 16px;
}
.checkbox{ color:#475569; font-size: 14px; }
.checkbox input{ transform: translateY(1px); margin-right:8px; }

.auth-link{ color: var(--teal); text-decoration:none; font-weight:600; }
.auth-link:hover{ text-decoration: underline; }

.auth-btn{
  width:100%;
  display:inline-flex; align-items:center; justify-content:center;
  border:none; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color:#fff; font-weight:700; font-size:16px;
  padding: 12px 14px; cursor:pointer;
  transition: transform .04s ease, filter .15s ease;
}
.auth-btn:hover{ filter: brightness(1.03); }
.auth-btn:active{ transform: translateY(1px); }

.auth-footer{
  text-align:center; color:#64748b; margin-top: 14px;
}

/* Dark mode friendly (optional) */
@media (prefers-color-scheme: dark){
  body.auth-body{ background: radial-gradient(1200px 600px at 10% -10%, rgba(0,128,128,.14) 0, transparent 60%), #0b1220; }
  .auth-card{ background:#0f172a; border-color:#0b1220; }
  .auth-logo{ box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
  .auth-brand h1{ color:#e5e7eb; }
  .auth-subtitle{ color:#93a3b8; }
  .auth-label{ color:#cfd8e3; }
  .auth-input{ background:#0b1220; border-color:#182135; color:#e5e7eb; }
  .auth-input::placeholder{ color:#70809b; }
  .auth-link{ color:#7de1da; }
  .auth-footer{ color:#93a3b8; }
  .auth-alert{ background:#3b0b0b; border-color:#7a1b1b; color:#ffd6d6; }
}

/* ---- Auth input normalization ---- */

/* ---- Auth input normalization (final) ---- */
.auth-input{
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 14px;              /* consistent left/right padding */
  padding-right: 48px;          /* room for password managers */
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: #0b1f24;          /* your dark input look */
  color: #fff;
  font-size: 16px;
  line-height: 46px;            /* vertical centering */
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input:focus{
  border-color: var(--teal, #008080);
  box-shadow: 0 0 0 4px rgba(0,128,128,.12);
}

/* Keep labels consistent */
.auth-label{
  display:block;
  font-weight:600;
  margin: 14px 0 6px;
}

/* WebKit autofill normalization */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus{
  -webkit-text-fill-color: #fff;
  transition: background-color 9999s ease-in-out 0s;
}

/* Optional: hide Edge reveal/clear to avoid size shifts */
.auth-input::-ms-reveal,
.auth-input::-ms-clear{ display:none; }

/* If you keep a show/hide password toggle absolutely positioned */
.auth-input-wrap{
  position: relative;
}
.auth-input-wrap .pw-toggle{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

/* Make labels consistent */
.auth-label{
  display:block;
  font-weight:600;
  margin: 14px 0 6px;
}

/* Page wrapper: centers content + adds responsive side padding */
.page-wrap{
  max-width: 1280px;                 /* keeps lines readable on huge screens */
  margin: 0 auto;                    /* center */
  padding: 24px clamp(16px, 4vw, 48px);  /* top/btm 24; sides scale 16→48px */
}

/* (optional) if you want a bit more card spacing from the wrapper edges */
.page-wrap .dash-grid{ gap: 22px; }

/* ----- Darker zebra table + header styling ----- */
table.zebra{
  border-collapse: collapse;           /* keeps borders clean */
}
table.zebra th,
table.zebra td{
  border: 1px solid #d1d9e0;           /* slightly darker grid */
}

/* Header */
table.zebra thead th{
  background: #dbe9ea;                 /* teal-tinted, darker than rows */
  color: #0f172a;
  font-weight: 700;
  position: sticky; top: 0;            /* optional: sticky header */
  z-index: 1;
}
table.zebra thead th a{ color: inherit; text-decoration: underline; }

/* Rows (darker zebra) */
table.zebra tbody tr:nth-child(odd)  td{ background:#e9eef2; }
table.zebra tbody tr:nth-child(even) td{ background:#e2e9ee; }
table.zebra tbody tr:hover            td{ background:#d7e3ea; } /* hover a touch darker */

/* Optional: strong brand header */
table.zebra.tealhead thead th{
  background: var(--teal, #008080);
  color: #fff;
  border-color: #006666;
}
table.zebra.tealhead thead th a{ color:#fff; }


/* --- Form control baseline (consistent size + box model) --- */
.input,
.textarea,
.select{
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #111;
  font: inherit;
  line-height: 1.2;
}

/* Textarea grows vertically but keeps the same visual style */
.textarea{
  min-height: 96px;
  height: auto;
  padding: 10px 12px;
  resize: vertical;
}

/* --- Date inputs: reserve room for the calendar button, align text --- */
input[type="date"].input{
  padding-right: 40px;                 /* room for the calendar icon */
  position: relative;
}

/* WebKit/Chromium date subparts */
input[type="date"].input::-webkit-datetime-edit{ padding: 0; }
input[type="date"].input::-webkit-calendar-picker-indicator{
  position: absolute;
  right: 10px;
  width: 20px; height: 20px;
  cursor: pointer;
  opacity: .85;
}

/* Firefox date icon is separate; keep height consistent */
@supports (-moz-appearance:none) {
  input[type="date"].input{ padding-right: 12px; } /* FF doesn't draw the icon inside */
}

/* --- Number inputs: remove spin button crowding, keep height --- */
input[type="number"].input::-webkit-outer-spin-button,
input[type="number"].input::-webkit-inner-spin-button{
  -webkit-appearance: none; margin: 0;
}
input[type="number"].input{ -moz-appearance: textfield; }

/* --- Select: native arrow space + consistent height --- */
select.input{
  appearance: none;
  padding-right: 34px;                 /* reserve arrow space */
  background-image:
    linear-gradient(45deg, transparent 50%, #667085 50%),
    linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position: right 12px center, right 8px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
select.input::-ms-expand{ display: none; } /* old IE/Edge */

/* --- Focus ring without shifting layout --- */
.input:focus,
.textarea:focus,
.select:focus{
  outline: none;
  border-color: #008080;
  box-shadow: 0 0 0 4px rgba(0,128,128,.12);
}

/* Labels shouldn’t overlap controls */
label{ display:block; font-weight:600; margin-bottom:6px; }

/* Fieldset spacing tidy */
fieldset{ position: relative; }
legend{ font-weight:700; padding: 0 8px; }

/* Dark theme override: make muted text brighter */
.text-muted {
  color: #cbd5f5 !important;   /* or #e5e7eb if you want it full bright */
}

.page-wrap h1,
.page-wrap h2,
.page-wrap h3,
.page-wrap h4,
.page-wrap h5,
.page-wrap h6 {
    color: #ffffff !important;
}
