:root{
  /* Blue corporate theme */
  --bg:#0b2a5b;           /* deep navy */
  --bg2:#0a3a7a;          /* header gradient */
  --card:#ffffff;
  --text:#0b1220;
  --muted:#5b6b82;
  --line:#e5eaf2;

  --primary:#0a4fa3;      /* corporate blue */
  --primary2:#0b3f82;     /* darker blue */
  --primary3:#0d63c8;     /* hover blue */
  --danger:#b91c1c;

  --ok:#0f766e;
  --warn:#b45309;

  --shadow:0 12px 28px rgba(11, 42, 91, .10);

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

*{ box-sizing:border-box; }
body{ margin:0; background:#f3f6fb; color:var(--text); }
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ max-width:1100px; margin:0 auto; padding:16px; }
.container.wide{ max-width:1800px; }

/* Header */
.site-header{
  background:linear-gradient(90deg, var(--bg), var(--bg2));
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.header-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px; }
.brand a{ display:inline-flex; align-items:center; gap:10px; }
.brand a::before{
  content:"";
  width:10px; height:10px;
  border-radius:3px;
  background:linear-gradient(180deg, #7dd3fc, #3b82f6);
  box-shadow:0 0 0 3px rgba(255,255,255,.12);
}
.tag{
  font-size:12px;
  padding:2px 10px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;
  opacity:.95;
}

.nav{ display:flex; gap:10px; flex-wrap:wrap; }
.nav a{
  opacity:.95;
  padding:9px 12px;
  border-radius:10px;
}
.nav a:hover{ background:rgba(255,255,255,.12); text-decoration:none; }

/* Cards & layout */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px;
  box-shadow:var(--shadow);
}
.hstack{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.spacer{ flex:1; }
.muted{ color:var(--muted); }
.section-title{ margin:0; font-size:20px; }
.help{ font-size:13px; color:var(--muted); }

/* Form fields */
.field{ display:flex; flex-direction:column; gap:6px; flex:1; min-width:240px; }
label{ font-weight:700; font-size:14px; }

input[type="text"], input[type="password"], input[type="date"], input[type="email"], select, textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid #cfd8e6;
  border-radius:12px;
  outline:none;
  background:#fff;
}
input::placeholder, textarea::placeholder{ color:#94a3b8; }
input:focus, textarea:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(147,197,253,.35);
}
textarea{ min-height:96px; resize:vertical; }

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  border:0;
  cursor:pointer;
  font-weight:750;
  letter-spacing:.1px;
  color:#fff;
  background:linear-gradient(180deg, var(--primary), var(--primary2));
  box-shadow:0 10px 18px rgba(10,79,163,.18);
}
.btn:hover{ background:linear-gradient(180deg, var(--primary3), var(--primary2)); }
.btn.secondary{
  background:linear-gradient(180deg, #334155, #1f2937);
  box-shadow:0 10px 18px rgba(15,23,42,.18);
}
.btn.link{
  background:transparent;
  color:var(--primary);
  border:1px solid #cfd8e6;
  box-shadow:none;
}
.btn.link:hover{
  background:rgba(147,197,253,.18);
  text-decoration:none;
}
.btn.danger{
  background:linear-gradient(180deg, #dc2626, #991b1b);
  box-shadow:0 10px 18px rgba(185,28,28,.18);
}
.btn:disabled{ opacity:.6; cursor:not-allowed; }

/* Alerts */
.alert{
  padding:10px 12px;
  border-radius:14px;
  margin:10px 0;
  border:1px solid var(--line);
}
.alert.ok{ background:#ecfeff; border-color:#a5f3fc; color:#155e75; }
.alert.error{ background:#fef2f2; border-color:#fecaca; color:#7f1d1d; }
.alert.warn{ background:#fffbeb; border-color:#fde68a; color:#7c2d12; }

/* Tables */
.table-wrap{
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--line);
  background:#fff;
}
.table-wrap.compact table{
  table-layout:fixed;
}
.table-wrap.compact th,
.table-wrap.compact td{
  padding:6px 8px;
  font-size:12px;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.table-wrap.compact th{
  line-height:1.2;
}
.table-wrap.compact .avatar.sm{
  width:20px;
  height:20px;
}
.lines{ line-height:1.35; }
.lines .line{ margin:0 0 2px 0; }
.lines .line:last-child{ margin-bottom:0; }
.col-no{ width:48px; text-align:center; white-space:nowrap; }
.table-wrap.wide table{
  min-width:2000px;
}
.table-wrap.wide th,
.table-wrap.wide td{
  white-space:nowrap;
}
table{ width:100%; border-collapse:separate; border-spacing:0; margin-top:0; }
th, td{
  padding:10px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
  text-align:left;
  white-space:nowrap;
}
td{ white-space:normal; }
th{
  background:linear-gradient(180deg, #eaf2ff, #f4f8ff);
  font-weight:800;
  position:sticky;
  top:0;
  z-index:1;
}
tbody tr:hover td{ background:#f7fbff; }

/* Footer */
.site-footer{
  margin-top:28px;
  padding:18px 0;
  border-top:1px solid var(--line);
  background:#fff;
}
th.foto-col, td.foto-col{
  width:24px;
  max-width:24px;
  white-space:nowrap;
}
.footer-row{ display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; }

/* Small screens */
@media (max-width: 640px){
  .nav a{ padding:8px 10px; }
  th, td{ padding:9px; }
  .field{ min-width: 100%; }
}

/* Avatars / photos */
.avatar{
  width:44px;
  height:44px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid #cfd8e6;
  background:#fff;
  display:inline-block;
}
.avatar.sm{ width:24px; height:24px; }
.avatar.placeholder{
  background:linear-gradient(180deg, #eaf2ff, #f4f8ff);
}

/* Date picker helper (calendar with custom display) */
.date-picker{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
}
