:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #120306;
  --bg-deep: #080102;
  --panel: rgba(28, 7, 11, .94);
  --panel-2: rgba(42, 10, 16, .92);
  --panel-3: rgba(18, 4, 7, .86);
  --line: rgba(255, 93, 108, .19);
  --line-strong: rgba(255, 75, 92, .43);
  --muted: #a98f93;
  --text: #fff7f8;
  --red: #ef233c;
  --red-bright: #ff4055;
  --red-dark: #850f20;
  --red-glow: rgba(239, 35, 60, .28);
  --yellow: #e6b929;
  --green: #27b77d;
  --purple: #a95ee0;
  --danger: #ff3049;
  --shadow: 0 28px 90px rgba(0, 0, 0, .58);
  --inner: inset 0 1px 0 rgba(255,255,255,.035);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); scroll-behavior: smooth; }
body {
  margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(166, 14, 35, .42), transparent 31rem),
    radial-gradient(circle at 92% 7%, rgba(100, 0, 17, .46), transparent 37rem),
    linear-gradient(135deg, #090102 0%, #1b0509 46%, #0b0103 100%);
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 38px 38px; mask-image: linear-gradient(to bottom, #000, transparent 78%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(239,35,60,.45); color: white; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0d0204; }
::-webkit-scrollbar-thumb { background: #4c111b; border: 2px solid #0d0204; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #77182a; }

.boot-screen { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.app-shell { min-height: 100vh; position: relative; isolation: isolate; }
.ambient { position: fixed; pointer-events: none; z-index: -1; border-radius: 50%; opacity: .72; contain: paint; }
.ambient-one { width: 430px; height: 430px; top: 70px; left: -250px; background: radial-gradient(circle, rgba(239,35,60,.29), transparent 68%); }
.ambient-two { width: 620px; height: 620px; right: -330px; top: 190px; background: radial-gradient(circle, rgba(147,7,29,.32), transparent 66%); }

.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px;
  min-height: 76px; padding: 0 28px;
  background: linear-gradient(180deg, rgba(24,4,7,.98), rgba(13,2,4,.96));
  border-top: 1px solid rgba(255,89,104,.22); border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0,0,0,.36);
}
.topbar::after { content:""; position:absolute; left:0; right:0; bottom:-1px; height:1px; background:linear-gradient(90deg,transparent,var(--red),transparent); opacity:.65; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 218px; white-space: nowrap; }
.brand-emblem {
  width: 46px; height: 46px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%;
  background: radial-gradient(circle at 35% 25%, #4c1420, #160408 68%); border:1px solid rgba(255,109,122,.4);
  box-shadow: 0 0 26px rgba(239,35,60,.2), var(--inner); overflow:hidden;
}
.brand-emblem img { width:39px; height:39px; object-fit:contain; filter:drop-shadow(0 4px 8px rgba(0,0,0,.45)); }
.brand-copy { display:grid; line-height:1.05; }
.brand-copy strong { font-size:1.02rem; letter-spacing:.16em; }
.brand-copy small { margin-top:6px; color:#cf7c87; font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; }
.nav { display:flex; align-items:stretch; gap:3px; flex:1; min-width:0; }
.nav-item, .nav-button {
  position:relative; display:flex; align-items:center; gap:8px; border:0; background:transparent; color:#cbb8bc;
  padding:27px 15px 24px; font-weight:850; font-size:.84rem; letter-spacing:.025em; border-bottom:2px solid transparent; white-space:nowrap;
}
.nav-item::before, .nav-button::before { content:""; position:absolute; inset:10px 3px; border-radius:8px; background:linear-gradient(180deg,rgba(255,54,75,.09),rgba(255,54,75,.015)); opacity:0; transition:.18s ease; }
.nav-item > *, .nav-button > * { position:relative; z-index:1; }
.nav-item:hover, .nav-button:hover, .nav-item.active, .nav-button.active { color:#fff; border-bottom-color:var(--red-bright); }
.nav-item:hover::before, .nav-button:hover::before, .nav-item.active::before { opacity:1; }
.nav-icon { color:#f34b5e; font-size:1rem; }
.chevron { color:#a65764; font-size:.7rem; }
.nav-dropdown { position:relative; }
.dropdown-menu {
  display:none; position:absolute; left:0; top:calc(100% + 1px); min-width:270px; padding:9px;
  background:rgba(22,4,8,.985); border:1px solid var(--line-strong); border-top:0; border-radius:0 0 14px 14px;
  box-shadow:0 26px 70px rgba(0,0,0,.62), 0 0 30px rgba(150,7,29,.12);
}
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { display:grid; }
.dropdown-menu button { display:flex; align-items:center; gap:11px; text-align:left; border:1px solid transparent; background:transparent; color:#e2d5d8; padding:10px; border-radius:9px; }
.dropdown-menu button:hover { background:linear-gradient(90deg,rgba(239,35,60,.16),rgba(239,35,60,.025)); border-color:rgba(255,80,98,.2); }
.dropdown-menu button:disabled { color:#694f54; cursor:not-allowed; }
.dropdown-menu img, .dropdown-mark { width:35px; height:35px; flex:0 0 35px; object-fit:contain; border-radius:50%; background:#21070c; border:1px solid rgba(255,90,106,.2); padding:3px; }
.dropdown-mark { display:grid; place-items:center; padding:0; color:#ff6b7b; font-size:.7rem; font-weight:950; letter-spacing:.04em; }
.dropdown-menu span:not(.dropdown-mark) { display:grid; }
.dropdown-menu strong { font-size:.82rem; }
.dropdown-menu small { color:#8e7278; margin-top:2px; }
.session-box { display:flex; align-items:center; gap:10px; margin-left:auto; }
.session-dot { width:8px; height:8px; border-radius:50%; background:#6e5257; box-shadow:0 0 0 4px rgba(110,82,87,.1); }
.session-dot.online { background:#29c987; box-shadow:0 0 0 4px rgba(41,201,135,.12),0 0 15px rgba(41,201,135,.4); }
.session-name { display:grid; min-width:120px; }
.session-name small { color:#866a70; font-size:.62rem; text-transform:uppercase; letter-spacing:.08em; }
.session-name strong { margin-top:3px; max-width:210px; overflow:hidden; text-overflow:ellipsis; font-size:.78rem; }

.main { width:min(1660px,100%); margin:0 auto; padding:34px 24px 76px; }
.content-frame {
  min-height:calc(100vh - 170px); padding:26px; border:1px solid rgba(255,87,104,.18); border-radius:22px;
  background:linear-gradient(145deg,rgba(31,6,11,.96),rgba(12,2,4,.97)); box-shadow:var(--shadow),var(--inner);
}
.page-head { display:flex; align-items:center; justify-content:space-between; gap:22px; margin-bottom:24px; padding:8px 4px 22px; border-bottom:1px solid rgba(255,81,99,.14); }
.page-identity { display:flex; align-items:center; gap:18px; min-width:0; }
.page-emblem { width:82px; height:82px; flex:0 0 82px; display:grid; place-items:center; border-radius:19px; overflow:hidden; background:radial-gradient(circle at 35% 25%,rgba(106,17,31,.8),rgba(17,3,6,.96) 70%); border:1px solid rgba(255,101,116,.34); box-shadow:0 0 30px rgba(207,17,47,.17),var(--inner); }
.page-emblem img { width:72px; height:72px; object-fit:contain; padding:3px; filter:drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.page-emblem-text span { font-weight:950; letter-spacing:.05em; color:#ff6b7c; font-size:1.25rem; }
.page-copy { min-width:0; }
.eyebrow { display:block; color:#e13f53; font-size:.68rem; font-weight:900; letter-spacing:.15em; text-transform:uppercase; }
.page-head h1 { margin:6px 0 0; font-size:clamp(1.75rem,3.5vw,2.75rem); letter-spacing:-.035em; }
.page-head p { margin:8px 0 0; color:var(--muted); max-width:760px; }
.unit-label { display:inline-block; margin-top:9px; color:#7e5d64; font-size:.68rem; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.page-actions { justify-content:flex-end; }
.actions { display:flex; gap:9px; flex-wrap:wrap; }

.btn { position:relative; overflow:hidden; border:1px solid rgba(255,94,111,.28); border-radius:10px; padding:10px 15px; background:linear-gradient(180deg,#321019,#1f080d); color:#fff7f8; font-weight:850; box-shadow:var(--inner); transition:transform .15s ease,filter .15s ease,border-color .15s ease; }
.btn::after { content:""; position:absolute; inset:0; background:linear-gradient(110deg,transparent,rgba(255,255,255,.08),transparent); transform:translateX(-120%); transition:.35s ease; }
.btn:hover { filter:brightness(1.15); border-color:rgba(255,111,126,.55); transform:translateY(-1px); }
.btn:hover::after { transform:translateX(120%); }
.btn-primary { background:linear-gradient(105deg,#9b1227,#f02b43); border-color:#ff5367; box-shadow:0 9px 25px rgba(210,18,47,.25),var(--inner); }
.btn-danger { background:linear-gradient(180deg,#711222,#380811); border-color:#a92c3e; }
.btn-success { background:linear-gradient(180deg,#177853,#0c3f2c); border-color:#2aaa79; }
.btn-small { padding:7px 10px; font-size:.79rem; }
.btn-ghost { background:rgba(255,255,255,.025); border-color:rgba(255,255,255,.09); }
.btn:disabled { opacity:.42; cursor:not-allowed; transform:none; }

.card { background:linear-gradient(145deg,rgba(42,9,15,.92),rgba(18,4,7,.96)); border:1px solid var(--line); border-radius:15px; box-shadow:0 18px 55px rgba(0,0,0,.3),var(--inner); }
.card-pad { padding:21px; }
.card h2 { margin-top:0; }
.grid { display:grid; gap:18px; }
.grid-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.profile-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(285px,1fr));
  gap:18px;
  align-items:stretch;
}
.profile-card {
  content-visibility:auto;
  contain-intrinsic-size:360px;
  display:flex;
  min-height:300px;
  flex-direction:column;
  overflow:hidden;
  border-color:rgba(255,93,108,.17);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.profile-card:hover {
  transform:translateY(-2px);
  border-color:rgba(255,93,110,.34);
  box-shadow:0 24px 58px rgba(0,0,0,.42),0 0 24px rgba(183,11,38,.07);
}
.profile-card-link { color:inherit; text-decoration:none; cursor:pointer; }
.profile-card-link:focus-visible { outline:3px solid var(--red-bright); outline-offset:3px; }
.profile-banner {
  position:relative;
  height:104px;
  flex:0 0 104px;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 84% 28%,rgba(255,58,80,.18),transparent 31%),
    linear-gradient(120deg,#140305,#4b0a15);
  border-bottom:1px solid rgba(255,88,105,.12);
}
.profile-banner::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:
    linear-gradient(90deg,rgba(8,1,2,.82),rgba(29,4,9,.35) 62%,rgba(57,6,15,.08)),
    repeating-linear-gradient(135deg,transparent 0 16px,rgba(255,255,255,.014) 16px 17px);
}
.profile-banner-lssd {
  background:
    radial-gradient(circle at 84% 28%,rgba(226,170,30,.13),transparent 31%),
    linear-gradient(120deg,#140305,#3d0b12);
}
.profile-banner-glow {
  position:absolute;
  right:-38px;
  top:-62px;
  width:190px;
  height:190px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(255,44,66,.14),transparent 69%);
}
.profile-banner-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.62; }
.profile-banner-lssd .profile-banner-glow {
  background:radial-gradient(circle,rgba(224,171,43,.11),transparent 69%);
}
.profile-banner-seal {
  position:absolute;
  right:14px;
  top:8px;
  width:88px;
  height:88px;
  object-fit:contain;
  opacity:.30;
  filter:drop-shadow(0 8px 16px rgba(0,0,0,.58));
  z-index:2;
}
.profile-banner-unit {
  position:absolute;
  left:18px;
  bottom:15px;
  color:rgba(255,230,233,.78);
  font-size:.68rem;
  font-weight:950;
  letter-spacing:.18em;
  text-transform:uppercase;
  z-index:2;
}
.profile-main {
  display:flex;
  flex:1;
  flex-direction:column;
  padding:18px 19px 20px;
}
.profile-identity-row {
  display:grid;
  grid-template-columns:62px minmax(0,1fr) auto;
  align-items:center;
  gap:13px;
}
.avatar {
  position:relative;
  width:62px;
  height:62px;
  flex:0 0 62px;
  margin:0;
  border:3px solid rgba(255,92,109,.22);
  border-radius:14px;
  object-fit:cover;
  object-position:center;
  background:#350a12;
  box-shadow:0 8px 22px rgba(0,0,0,.34);
}
.avatar-placeholder {
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#50101d,#1e0509);
  color:#ffe6ea;
}
.avatar-placeholder span {
  font-size:1.1rem;
  font-weight:950;
  letter-spacing:.03em;
  text-shadow:0 3px 10px rgba(0,0,0,.45);
}
.profile-identity-copy { min-width:0; }
.profile-main h3 {
  margin:0 0 5px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:1.05rem;
}
.profile-agency {
  align-self:start;
  margin:0;
  border:1px solid rgba(255,89,106,.22);
  border-radius:6px;
  padding:4px 7px;
  color:#ef6575;
  font-size:.63rem;
  font-weight:900;
  letter-spacing:.08em;
}
.meta {
  overflow:hidden;
  color:var(--muted);
  font-size:.82rem;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.profile-bio {
  margin-top:auto;
  padding-top:13px;
  min-height:55px;
}
.profile-main p {
  margin:0;
  line-height:1.5;
  color:#c9b6ba;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.badges {
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-top:15px;
}
.badge {
  border:1px solid rgba(255,93,111,.2);
  background:rgba(65,15,24,.62);
  border-radius:999px;
  padding:5px 9px;
  font-size:.73rem;
  font-weight:850;
}
.badge-blue { border-color:#315f92; color:#83b9f0; background:rgba(18,42,68,.58); }
.badge-yellow { border-color:#856c22; color:#f1ca4f; background:rgba(67,50,12,.55); }
.badge-red { border-color:#a72d40; color:#ff8794; background:rgba(92,14,27,.55); }
.badge-green { border-color:#237756; color:#65ddb0; background:rgba(12,63,44,.55); }
.badge-purple { border-color:#6d3b91; color:#d09af1; background:rgba(56,22,79,.55); }

.profile-detail { overflow:hidden; }
.profile-detail-hero {
  position:relative; height:210px; overflow:hidden;
  background:radial-gradient(circle at 78% 35%,rgba(255,58,80,.24),transparent 26%),linear-gradient(120deg,#120204,#5b0b19);
  border-bottom:1px solid var(--line-strong);
}
.profile-detail-hero::before { content:""; position:absolute; inset:0; background:repeating-linear-gradient(135deg,transparent 0 25px,rgba(255,255,255,.018) 25px 26px); }
.profile-detail-seal { position:absolute; right:clamp(22px,7vw,100px); top:18px; width:175px; height:175px; object-fit:contain; opacity:.28; filter:drop-shadow(0 12px 24px rgba(0,0,0,.6)); }
.profile-detail-banner-image { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.72; }
.profile-detail-body { position:relative; display:grid; grid-template-columns:170px minmax(0,1fr); gap:24px 30px; padding:0 34px 34px; }
.profile-detail-avatar { width:170px; height:170px; margin-top:-74px; z-index:2; border:5px solid #25070c; border-radius:24px; object-fit:cover; background:linear-gradient(145deg,#50101d,#1e0509); box-shadow:0 18px 38px rgba(0,0,0,.5); }
.profile-detail-avatar.avatar-placeholder { display:grid; place-items:center; font-size:2.4rem; font-weight:950; }
.profile-detail-identity { padding-top:24px; min-width:0; }
.profile-detail-identity h2 { margin:10px 0 5px; font-size:clamp(1.65rem,3vw,2.5rem); }
.profile-detail-section { grid-column:1/-1; padding-top:22px; border-top:1px solid var(--line); }
.profile-detail-section > p { margin:12px 0 0; color:#d5c1c5; line-height:1.75; white-space:pre-wrap; }
.division-detail-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(185px,1fr)); gap:10px; margin-top:13px; }
.division-detail { display:grid; gap:6px; padding:14px; border:1px solid var(--line); border-radius:11px; background:rgba(45,9,16,.72); }
.division-detail span { color:#f05769; font-size:.72rem; font-weight:950; letter-spacing:.1em; }
.division-detail strong { color:#f7e9eb; }

.profile-editor-card { max-width:1050px; margin:0 auto; }
.division-editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; }
.division-editor { display:grid; gap:10px; padding:14px; border:1px solid var(--line); border-radius:11px; background:rgba(45,9,16,.62); }
.division-toggle { display:flex; align-items:center; gap:9px; color:#fff; }
.division-toggle input { width:18px; height:18px; accent-color:var(--red-bright); }
.division-editor > input,.division-editor > select { width:100%; border:1px solid rgba(255,95,112,.21); border-radius:9px; background:rgba(13,2,4,.82); color:white; padding:10px 11px; outline:none; }

.sync-badge { display:inline-flex; align-items:center; gap:9px; padding:9px 13px; border:1px solid #856c22; border-radius:999px; background:rgba(67,50,12,.55); color:#f1ca4f; font-size:.75rem; font-weight:900; white-space:nowrap; }
.sync-badge i { width:8px; height:8px; border-radius:50%; background:#e6b929; box-shadow:0 0 0 4px rgba(230,185,41,.12); }
.hours-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.hours-stat { display:grid; gap:7px; padding:18px; min-height:128px; }
.hours-stat span { color:#c9b6ba; font-size:.78rem; font-weight:850; text-transform:uppercase; letter-spacing:.06em; }
.hours-stat strong { font-size:clamp(1.65rem,3vw,2.25rem); color:#fff; }
.hours-stat small { color:#7f6268; }
.hours-toolbar { display:grid; grid-template-columns:220px 220px minmax(260px,1fr); gap:13px; margin-bottom:14px; }
.hours-toolbar :disabled { cursor:not-allowed; opacity:.62; }
.hours-connection-notice { margin-bottom:18px; }
.hours-corps-list { display:grid; gap:15px; }
.hours-corps { overflow:hidden; }
.hours-corps-head { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:17px 19px; border-bottom:1px solid var(--line); }
.hours-corps-head h2 { margin:0; font-size:1rem; }
.hours-corps-head p { margin:5px 0 0; color:var(--muted); font-size:.78rem; }
.hours-count { padding:5px 9px; border:1px solid var(--line); border-radius:999px; color:#d58b96; background:rgba(74,14,25,.55); font-size:.72rem; font-weight:900; white-space:nowrap; }
.hours-table { border:0; border-radius:0; }
.hours-table table { min-width:950px; }
.hours-empty { padding:24px; color:#80656a; text-align:center; font-style:italic; }

.table-wrap { width:100%; overflow:auto; border:1px solid var(--line); border-radius:14px; background:rgba(12,2,4,.78); box-shadow:var(--inner); }
table { width:100%; border-collapse:separate; border-spacing:0; min-width:900px; }
th { position:sticky; top:0; z-index:2; background:linear-gradient(180deg,#40101a,#26070d); color:#f0dfe2; text-transform:uppercase; letter-spacing:.065em; font-size:.7rem; }
th:first-child { border-top-left-radius:12px; }
th:last-child { border-top-right-radius:12px; }
th,td { padding:11px 12px; border-bottom:1px solid rgba(255,83,100,.10); border-right:1px solid rgba(255,83,100,.08); text-align:left; }
td { color:#e6d8db; background:rgba(28,6,10,.55); }
tbody tr:nth-child(even) td { background:rgba(37,8,13,.61); }
tbody tr:hover td { background:rgba(99,15,29,.38); }
.group-row td { background:linear-gradient(90deg,#671126,#9e172f,#671126)!important; color:white; font-weight:950; text-align:center; letter-spacing:.08em; text-transform:uppercase; box-shadow:inset 0 1px rgba(255,255,255,.08); }
.agency-corps-divider td > div { display:inline-grid; gap:3px; }
.agency-corps-divider td { position:relative; }
.agency-corps-divider small { color:#e6a5b0; font-size:.65rem; font-weight:700; letter-spacing:.02em; text-transform:none; }
.agency-corps-divider span { position:absolute; right:14px; top:50%; transform:translateY(-50%); padding:4px 8px; border:1px solid rgba(255,255,255,.22); border-radius:999px; font-size:.66rem; letter-spacing:0; text-transform:none; }
.management-section { margin-top:20px; }
@media print {
  .topbar,.site-footer,.page-actions,.btn,.search-row { display:none!important; }
  body,.app-shell,.main,.content-frame,.card,.table-wrap { background:#fff!important; color:#111!important; box-shadow:none!important; border-color:#bbb!important; }
  .management-section { break-inside:avoid; }
  table { min-width:0!important; font-size:10px; }
}
.empty { color:#846a70; font-style:italic; }
.inline-input,.inline-select { width:100%; min-width:120px; padding:8px 9px; border:1px solid rgba(255,91,108,.22); border-radius:8px; background:#160408; color:white; outline:none; }
.checkbox { width:18px; height:18px; accent-color:var(--red-bright); }
.status-pill { display:inline-flex; align-items:center; justify-content:center; min-width:92px; padding:5px 10px; border-radius:999px; font-size:.76rem; font-weight:900; }
.status-active { background:#0e6445; color:#b8ffe2; border:1px solid #19845c; }
.status-leave { background:#6a5110; color:#fff0ae; border:1px solid #8d6e1d; }
.status-suspended { background:#841326; color:#ffd0d6; border:1px solid #ad2b40; }
.status-dismissed,.status-inactive { background:#38282b; color:#c5b4b8; border:1px solid #554147; }

.search-row { display:flex; gap:10px; margin-bottom:15px; flex-wrap:wrap; }
.search-input { min-width:min(420px,100%); }
.field { display:grid; gap:7px; }
.field label { color:#eadadd; font-size:.82rem; font-weight:850; }
.field input,.field select,.field textarea,.search-input { border:1px solid rgba(255,95,112,.21); border-radius:10px; background:rgba(13,2,4,.82); color:white; padding:11px 12px; outline:none; box-shadow:inset 0 1px 8px rgba(0,0,0,.25); }
.field input::placeholder,.field textarea::placeholder,.search-input::placeholder { color:#765d62; }
.field input:focus,.field select:focus,.field textarea:focus,.search-input:focus { border-color:#f34358; box-shadow:0 0 0 3px rgba(239,35,60,.13),inset 0 1px 8px rgba(0,0,0,.25); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-grid .full { grid-column:1/-1; }
.help { color:#8c7378; font-size:.78rem; }

.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:18px; background:rgba(4,0,1,.91); }
.modal { width:min(720px,100%); max-height:90vh; overflow:auto; background:linear-gradient(145deg,#2a0710,#100204); border:1px solid rgba(255,91,108,.36); border-radius:17px; box-shadow:0 32px 100px rgba(0,0,0,.7),0 0 50px rgba(174,9,35,.12); }
.modal-head { display:flex; justify-content:space-between; align-items:center; padding:18px 20px; border-bottom:1px solid var(--line); background:rgba(255,45,67,.035); }
.modal-head h2 { margin:0; }
.modal-body { padding:20px; }
.modal-foot { display:flex; justify-content:flex-end; gap:9px; padding:16px 20px; border-top:1px solid var(--line); }
.icon-btn { border:0; background:transparent; color:#be9fa5; font-size:1.25rem; }

.notice { padding:13px 15px; border:1px solid rgba(255,91,108,.22); border-radius:10px; background:rgba(58,13,21,.54); color:#dac7cb; }
.notice-success { border-color:#217658; background:#0d3527; color:#a8eed3; }
.notice-error { border-color:#b42c42; background:#490c17; color:#ffc0c8; }
.notice-warning { border-color:#8d6d1c; background:#3a2d0a; color:#f5dd8b; }
.counter { display:flex; align-items:center; gap:7px; }
.counter strong { min-width:38px; text-align:center; }
.counter button { width:29px; height:29px; border:1px solid rgba(255,91,108,.26); border-radius:7px; background:#36101a; color:white; }
.account-card { display:grid; gap:13px; padding:17px; border:1px solid var(--line); border-radius:12px; background:linear-gradient(145deg,rgba(49,10,18,.8),rgba(19,3,6,.9)); box-shadow:var(--inner); }
.account-head { display:flex; justify-content:space-between; gap:12px; }
.permission-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:8px; }
.permission-item { display:flex; align-items:center; gap:7px; padding:8px; border:1px solid rgba(255,91,108,.16); border-radius:8px; background:rgba(56,13,21,.5); }
.divider { height:1px; background:var(--line); margin:18px 0; }
.muted { color:var(--muted); }
.small { font-size:.8rem; }
.hidden { display:none!important; }
.loading { opacity:.65; pointer-events:none; }

.toast-stack { position:fixed; right:18px; bottom:18px; z-index:200; display:grid; gap:9px; width:min(390px,calc(100% - 36px)); }
.toast { padding:13px 15px; border:1px solid rgba(255,92,109,.32); border-radius:11px; background:linear-gradient(145deg,#3b0c16,#1b0408); box-shadow:var(--shadow); }
.toast.error { border-color:#db3c52; }
.toast.success { border-color:#2f936b; }
.site-footer { width:min(1660px,100%); margin:0 auto; padding:0 28px 28px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:16px; color:#684b51; font-size:.66rem; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.site-footer span:nth-child(2) { color:#9e6570; text-align:center; }
.site-footer span:last-child { text-align:right; }

@media (max-width:1120px) {
  .topbar { flex-wrap:wrap; padding:8px 14px; }
  .brand { min-height:54px; }
  .nav { order:3; width:100%; overflow:auto; }
  .nav-item,.nav-button { padding:14px 12px 13px; }
  .dropdown-menu { position:fixed; top:125px; left:14px; right:14px; }
  .session-name { display:none; }
  .grid-3,.grid-2 { grid-template-columns:1fr; }
  .hours-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .hours-toolbar { grid-template-columns:1fr 1fr; }
  .hours-search-field { grid-column:1/-1; }
}
@media (max-width:720px) {
  .main { padding:18px 9px 48px; }
  .content-frame { padding:15px; border-radius:16px; }
  .page-head { align-items:flex-start; flex-direction:column; }
  .page-identity { align-items:flex-start; }
  .page-emblem { width:62px; height:62px; flex-basis:62px; border-radius:14px; }
  .page-emblem img { width:55px; height:55px; }
  .page-actions { width:100%; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid .full { grid-column:auto; }
  .brand { min-width:auto; }
  .brand-copy small { display:none; }
  .profile-grid { grid-template-columns:1fr; }
  .site-footer { padding:0 14px 20px; grid-template-columns:1fr; text-align:center; }
  .site-footer span:last-child { text-align:center; }
  .profile-detail-hero { height:150px; }
  .profile-detail-seal { width:120px; height:120px; }
  .profile-detail-body { grid-template-columns:92px minmax(0,1fr); gap:16px; padding:0 17px 22px; }
  .profile-detail-avatar { width:92px; height:92px; margin-top:-42px; border-radius:17px; }
  .profile-detail-identity { padding-top:14px; }
  .division-editor-grid { grid-template-columns:1fr; }
  .hours-summary { grid-template-columns:1fr; }
  .hours-toolbar { grid-template-columns:1fr; }
  .hours-search-field { grid-column:auto; }
  .hours-corps-head { align-items:flex-start; }
}

/* v6 — compact profile cards and cleaner home layout */
@media (min-width: 1400px) {
  .profile-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .profile-identity-row { grid-template-columns:56px minmax(0,1fr) auto; gap:10px; }
  .avatar { width:56px; height:56px; }
  .profile-banner { height:88px; flex-basis:88px; }
  .profile-banner-seal { width:72px; height:72px; }
}


/* Ogranicza koszt efektów na słabszych urządzeniach bez zmiany układu. */
@media (max-width:1120px), (prefers-reduced-motion: reduce) {
  body::before, .ambient { display:none; }
  .btn, .profile-card, .nav-item::before, .nav-button::before { transition:none; }
}
