/* ══════════════════════════════════════════════
   S.U.D.O. — style.css v3.0
   $ sudo make --beautiful --large --animated
══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,300;0,6..12,400;0,6..12,500;0,6..12,600;0,6..12,700;1,6..12,400&family=DM+Mono:wght@400;500&display=swap');

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

:root {
  --s50:  #FAFAF7; --s100: #F3F2ED; --s200: #E8E6DF;
  --s300: #D4D1C6; --s400: #B8B4A6;
  --g600: #6B6860; --g700: #4A4844; --g800: #2E2D2A; --g900: #1A1917;
  --y100: #FEF5D0; --y200: #FDE99A; --y300: #F5D84A;
  --y400: #D4AF37; --y600: #8A6F10; --y700: #5C490A;
  --gr100: #E8F5EE; --gr600: #2D7D52;
  --re100: #FAEAEA; --re600: #C0392B;
  --bl100: #E8F0FB; --bl600: #2563EB;
  --pu100: #EEEDFE; --pu600: #534AB7;
  --or100: #FEF0E0; --or600: #C2610C;
  --font: 'Nunito Sans', -apple-system, sans-serif;
  --mono: 'DM Mono', 'Fira Code', monospace;
  --sidebar-w: 232px;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,.07);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.14);
}

html, body {
  font-family: var(--font);
  font-size: 15px;          /* ← #13: крупнее базовый шрифт */
  background: var(--s50);
  color: var(--g800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* ══════════════════════════════════════════════
   ANIMATIONS — #4
══════════════════════════════════════════════ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(16px) } to { opacity:1; transform:none } }
@keyframes fadeIn   { from { opacity:0 } to { opacity:1 } }
@keyframes slideIn  { from { opacity:0; transform:translateX(-16px) } to { opacity:1; transform:none } }
@keyframes scaleIn  { from { opacity:0; transform:scale(.95) } to { opacity:1; transform:none } }
@keyframes pulse    { 0%,100% { opacity:1 } 50% { opacity:.6 } }
@keyframes blink    { 50% { opacity:0 } }
@keyframes spin     { to { transform: rotate(360deg) } }
@keyframes shimmer  {
  0%   { background-position: -200% 0 }
  100% { background-position:  200% 0 }
}

[data-animate] { opacity: 0; }
[data-animate].anim-in { animation: fadeUp .5s cubic-bezier(.34,1.3,.64,1) forwards; }
[data-animate="slide-in"].anim-in { animation: slideIn .4s ease forwards; }
[data-animate="scale-in"].anim-in { animation: scaleIn .35s ease forwards; }
[data-animate="fade"].anim-in { animation: fadeIn .4s ease forwards; }

/* Page entrance */
.app-content { animation: fadeIn .3s ease; }

/* ══════════════════════════════════════════════
   DEADLINE INDICATORS — #8
══════════════════════════════════════════════ */
.deadline-overdue {
  color: var(--re600) !important; font-weight: 700 !important;
  animation: pulse 2s infinite;
}
.deadline-overdue::after { content: ' ⚠'; }

.deadline-today {
  color: var(--or600) !important; font-weight: 700 !important;
}
.deadline-today::after { content: ' ⏰'; }

.deadline-soon {
  color: var(--y600) !important; font-weight: 600 !important;
}

.deadline-badge-overdue {
  background: var(--re100); color: var(--re600);
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
  animation: pulse 2s infinite;
}
.deadline-badge-today {
  background: var(--or100); color: var(--or600);
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}
.deadline-badge-soon {
  background: var(--y100); color: var(--y600);
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700;
}

/* ══════════════════════════════════════════════
   PRIORITY BADGES — #7
══════════════════════════════════════════════ */
.priority-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.p-critical { background: #FDE8E8; color: #8B0000; }
.p-high     { background: #FEF0E0; color: #C2610C; }
.p-medium   { background: #FEF5D0; color: #8A6F10; }
.p-low      { background: #E8F5EE; color: #2D7D52; }

/* ══════════════════════════════════════════════
   LOGIN
══════════════════════════════════════════════ */
.login-body { background: var(--s100); }
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
}
.login-card {
  width: 400px;
  background: white; border: 1px solid var(--s200);
  border-radius: 18px; padding: 42px 38px 34px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn .4s cubic-bezier(.34,1.3,.64,1);
}
.login-logo { text-align: center; margin-bottom: 34px; }
.login-mark {
  width: 60px; height: 60px; background: var(--g900);
  border-radius: 15px; display: inline-flex;
  align-items: center; justify-content: center; margin-bottom: 16px;
}
.login-mark-text { font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--y300); letter-spacing: -1px; }
.login-title { font-size: 26px; font-weight: 800; color: var(--g900); letter-spacing: .5px; }
.login-full-name { font-size: 12px; color: var(--g600); margin-top: 5px; }
.login-slogan { font-size: 12px; color: var(--y600); font-style: italic; margin-top: 7px; font-weight: 700; }
.fsub {
  width: 100%; padding: 14px;
  background: var(--g900); border: none; border-radius: 11px;
  font-family: var(--mono); font-size: 15px; font-weight: 500;
  color: var(--y300); cursor: pointer; margin-top: 8px;
  transition: background .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.fsub:hover { background: var(--g800); }
.fsub:active { transform: scale(.98); }
.fsub-prefix { opacity: .4; }
.login-footer { text-align: center; font-size: 13px; color: var(--g600); margin-top: 22px; }
.login-version { font-size: 11px; color: var(--s400); margin-top: 14px; font-family: var(--mono); }

/* ══════════════════════════════════════════════
   FORM ELEMENTS
══════════════════════════════════════════════ */
.fg { margin-bottom: 18px; }
.fl { font-size: 13px; font-weight: 700; color: var(--g700); margin-bottom: 7px; display: block; }
.fi {
  width: 100%; padding: 11px 15px;
  border: 1.5px solid var(--s200); border-radius: 11px;
  font-size: 14px; background: var(--s50); color: var(--g800);
  outline: none; transition: border-color .15s, background .15s, box-shadow .15s;
}
.fi:focus {
  border-color: var(--y400); background: white;
  box-shadow: 0 0 0 3px var(--y100);
}
select.fi {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6860' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px;
}
textarea.fi { resize: vertical; min-height: 90px; }
.form-error-banner {
  background: var(--re100); color: var(--re600);
  border-radius: 11px; padding: 13px 15px; font-size: 14px;
  margin-bottom: 18px; display: flex; align-items: center; gap: 9px;
}
.field-error { font-size: 12px; color: var(--re600); margin-top: 5px; }

/* Drop zone — #5 */
.drop-zone {
  border: 2px dashed var(--s300); border-radius: 11px;
  padding: 24px; text-align: center; cursor: pointer;
  transition: all .2s; color: var(--g600); font-size: 13px;
  background: var(--s50);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--y400); background: var(--y100); color: var(--y700);
}
.drop-zone i { font-size: 28px; display: block; margin-bottom: 8px; }
.file-list { margin-top: 12px; text-align: left; }

/* ══════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════ */
.app-shell { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--s100); border-right: 1px solid var(--s200);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sb-logo { padding: 22px 18px 16px; border-bottom: 1px solid var(--s200); }
.sb-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.sb-icon {
  width: 34px; height: 34px; background: var(--g900); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  color: var(--y300); flex-shrink: 0; letter-spacing: -1px;
}
.sb-name { font-size: 17px; font-weight: 800; color: var(--g900); letter-spacing: .3px; }
.sb-tagline { font-size: 10px; color: var(--g600); font-style: italic; }
.sb-nav { padding: 18px 10px; flex: 1; }
.sb-sec { margin-bottom: 26px; }
.sb-lbl {
  font-size: 10px; font-weight: 800; color: var(--s400);
  letter-spacing: .9px; text-transform: uppercase;
  padding: 0 10px; margin-bottom: 7px; display: block;
}
.ni {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 10px;
  color: var(--g600); font-size: 14px; font-weight: 500;
  transition: background .12s, color .12s, transform .1s;
  width: 100%; border: none; background: none;
}
.ni:hover { background: var(--s200); color: var(--g800); transform: translateX(2px); }
.ni.on   { background: var(--y100); color: var(--y600); font-weight: 700; }
.ni i    { font-size: 18px; flex-shrink: 0; }
.nbadge {
  margin-left: auto; background: var(--s200); color: var(--g600);
  font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 700;
}
.ni.on .nbadge { background: var(--y200); color: var(--y600); }
.sb-user {
  padding: 14px 16px; border-top: 1px solid var(--s200);
  display: flex; align-items: center; gap: 11px;
}
.sb-av {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.sb-av img { width: 100%; height: 100%; object-fit: cover; }
.sb-username { font-size: 14px; font-weight: 700; color: var(--g800); }
.sb-userrole { font-size: 11px; color: var(--g600); }
.sb-logout {
  margin-left: auto; color: var(--g600); font-size: 19px;
  display: flex; align-items: center; transition: color .12s, transform .1s;
}
.sb-logout:hover { color: var(--re600); transform: translateX(2px); }

/* MAIN */
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--s200);
  background: var(--s50); position: sticky; top: 0; z-index: 50;
}
.page-title   { font-size: 20px; font-weight: 800; color: var(--g900); }
.page-subtitle { font-size: 13px; color: var(--g600); margin-top: 3px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.app-content  { padding: 26px 28px; flex: 1; }

/* Messages */
.messages-wrap { margin-bottom: 20px; }
.sudo-message {
  padding: 14px 18px; border-radius: 12px; font-size: 14px;
  display: flex; align-items: center; gap: 10px; margin-bottom: 9px;
  animation: slideIn .3s ease;
}
.sudo-message--success { background: var(--gr100); color: var(--gr600); }
.sudo-message--error,
.sudo-message--warning  { background: var(--re100); color: var(--re600); }
.sudo-message--info     { background: var(--bl100); color: var(--bl600); }
.msg-close {
  margin-left: auto; background: none; border: none;
  font-size: 20px; cursor: pointer; opacity: .5; color: inherit;
  transition: opacity .1s;
}
.msg-close:hover { opacity: 1; }

/* ══════════════════════════════════════════════
   BUTTONS — крупнее #13
══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 10px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all .15s cubic-bezier(.34,1.3,.64,1);
}
.btn i { font-size: 17px; }
.btn:active { transform: scale(.97); }
.btn-y { background: var(--y300); color: var(--y700); border-color: var(--y300); }
.btn-y:hover { background: var(--y400); border-color: var(--y400); box-shadow: 0 3px 12px var(--y200); }
.btn-o { background: none; color: var(--g600); border-color: var(--s300); }
.btn-o:hover { background: var(--s100); color: var(--g800); }
.btn-r { background: var(--re100); color: var(--re600); border-color: var(--re100); }
.btn-r:hover { background: var(--re600); color: white; }
.btn-g { background: var(--gr100); color: var(--gr600); border-color: var(--gr100); }
.btn-g:hover { background: var(--gr600); color: white; }
.btn-dark { background: var(--g900); color: var(--y300); border-color: var(--g900); font-family: var(--mono); }
.btn-dark:hover { background: var(--g800); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-sm i { font-size: 14px; }

/* ══════════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════════ */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 26px;
}
.sc {
  background: white; border: 1px solid var(--s200);
  border-radius: 14px; padding: 20px 22px;
  position: relative; overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.sc:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.sc-accent { position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.sc-lbl  { font-size: 13px; color: var(--g600); margin-bottom: 10px; font-weight: 500; }
.sc-val  { font-size: 34px; font-weight: 800; color: var(--g900); line-height: 1; }
.sc-sub  { font-size: 12px; margin-top: 7px; }
.sc-sub.up { color: var(--gr600); } .sc-sub.dn { color: var(--re600); } .sc-sub.wa { color: var(--y600); }

/* ══════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════ */
.badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.b-discussion      { background: var(--s200); color: var(--g700); }
.b-development     { background: var(--bl100); color: var(--bl600); }
.b-awaiting_payment{ background: var(--y100); color: var(--y600); }
.b-delivered       { background: var(--gr100); color: var(--gr600); }
.b-ours            { background: var(--y100); color: var(--y600); }
.b-supplier        { background: var(--bl100); color: var(--bl600); }
.b-urg             { background: var(--re100); color: var(--re600); }
.b-don             { background: var(--gr100); color: var(--gr600); }

/* ══════════════════════════════════════════════
   TABLE
══════════════════════════════════════════════ */
.tbl {
  width: 100%; border-collapse: collapse;
  background: white; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--s200);
}
.tbl th {
  font-size: 12px; font-weight: 700; color: var(--g600);
  text-transform: uppercase; letter-spacing: .5px;
  padding: 14px 18px; text-align: left;
  background: var(--s100); border-bottom: 1px solid var(--s200);
}
.tbl td { padding: 15px 18px; border-bottom: 1px solid var(--s100); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl-row-link { cursor: pointer; transition: background .1s; }
.tbl-row-link:hover td { background: var(--s50); }
.pname { font-weight: 700; color: var(--g900); font-size: 15px; }
.pcli  { font-size: 12px; color: var(--g600); margin-top: 2px; }

/* PROGRESS */
.prog { background: var(--s200); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 5px; }
.prog-f { height: 100%; border-radius: 4px; background: var(--y400); transition: width .6s ease; }
.prog-f.full { background: var(--gr600); }

/* PAYMENT DOT */
.pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.pdot.p { background: var(--gr600); }
.pdot.u { background: var(--s300); }
.overdue-text { color: var(--re600); font-weight: 700; }

/* CARDS */
.card {
  background: white; border: 1px solid var(--s200);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow); }
.ch {
  padding: 18px 20px; border-bottom: 1px solid var(--s100);
  display: flex; align-items: center; justify-content: space-between;
}
.ct { font-size: 15px; font-weight: 700; color: var(--g800); }

/* PILLS */
.pills { display: flex; gap: 7px; flex-wrap: wrap; }
.pill {
  padding: 7px 16px; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid var(--s200); background: none;
  color: var(--g600); font-family: inherit; transition: all .15s;
}
.pill:hover { background: var(--s100); }
.pill.on { background: var(--y100); border-color: var(--y300); color: var(--y600); }

/* SECTION HEADER */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 16px; font-weight: 700; color: var(--g800); }

/* TASK ROW */
.task {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 0; border-bottom: 1px solid var(--s100);
  transition: background .1s;
}
.task:last-child { border-bottom: none; }
.task:hover { background: var(--s50); margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
.tbox {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--s300); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .15s;
}
.tbox:hover { border-color: var(--y400); background: var(--y100); }
.tbox.done { background: var(--y300); border-color: var(--y400); }
.tbox.done::after { content: '✓'; font-size: 11px; color: var(--y700); font-weight: 800; }
.ttxt { font-size: 14px; color: var(--g800); flex: 1; }
.ttxt.done { text-decoration: line-through; color: var(--s400); }

/* AVATARS */
.av {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0; overflow: hidden;
}
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.sm {
  width: 28px; height: 28px; font-size: 11px;
  margin-left: -8px; border: 2.5px solid white;
}
.avs { display: flex; }
.avs .av.sm:first-child { margin-left: 0; }

/* SUDO AVATARS PRESET — #6 */
.avatar-presets { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.avatar-preset-item {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid var(--s200);
  transition: all .2s; background: white; font-size: 22px; gap: 2px;
}
.avatar-preset-item span { font-size: 9px; color: var(--g600); font-weight: 600; }
.avatar-preset-item:hover { border-color: var(--y400); transform: scale(1.1); }
.avatar-preset-item.selected {
  border-color: var(--y400); background: var(--y100);
  transform: scale(1.1); box-shadow: 0 0 0 3px var(--y200);
}

/* INFO ROWS */
.irow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 0; border-bottom: 1px solid var(--s100); font-size: 14px;
}
.irow:last-child { border-bottom: none; }
.ik { color: var(--g600); }
.iv { font-weight: 700; color: var(--g800); }

/* STATUS TIMELINE */
.status-tl {
  display: flex; align-items: center;
  padding: 16px 28px; border-bottom: 1px solid var(--s200); background: var(--s50);
}
.tl-step { display: flex; flex-direction: column; align-items: center; flex: 1; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--s200); border: 2px solid var(--s300); transition: all .3s; }
.tl-dot.done { background: var(--y400); border-color: var(--y400); }
.tl-dot.cur  { background: white; border-color: var(--y400); box-shadow: 0 0 0 4px var(--y100); animation: pulse 2s infinite; }
.tl-lbl { font-size: 11px; color: var(--g600); margin-top: 6px; text-align: center; font-weight: 600; }
.tl-lbl.done { color: var(--y600); }
.tl-line { flex: 1; height: 2px; background: var(--s200); margin-top: -8px; transition: background .3s; }
.tl-line.done { background: var(--y300); }

/* PROJECT CARDS */
.pcards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pcard {
  background: white; border: 1px solid var(--s200);
  border-radius: var(--radius); padding: 20px; cursor: pointer;
  transition: all .2s cubic-bezier(.34,1.3,.64,1);
}
.pcard:hover { border-color: var(--s300); box-shadow: var(--shadow); transform: translateY(-2px); }
.pcard-add {
  border: 2px dashed var(--s300); background: none;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 150px; gap: 10px; color: var(--g600);
  border-radius: var(--radius); cursor: pointer; transition: all .2s;
}
.pcard-add:hover { border-color: var(--y400); color: var(--y600); background: var(--y100); transform: scale(1.01); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(26,25,23,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: white; border-radius: 18px;
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.96);
  transition: transform .3s cubic-bezier(.34,1.3,.64,1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  padding: 24px 26px 20px; border-bottom: 1px solid var(--s100);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: white; z-index: 1;
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--g900); }
.modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--s100); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--g600); transition: all .12s;
}
.modal-close:hover { background: var(--s200); color: var(--g900); transform: rotate(90deg); }
.modal-body { padding: 24px 26px; }
.modal-footer {
  padding: 18px 26px 24px;
  display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid var(--s100);
}

/* TEAM CARDS */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.team-card {
  background: white; border: 1px solid var(--s200);
  border-radius: var(--radius); overflow: hidden;
  transition: all .2s;
}
.team-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.team-card-header {
  padding: 22px; border-bottom: 1px solid var(--s100);
  display: flex; align-items: center; gap: 14px;
}
.team-av {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; flex-shrink: 0; overflow: hidden;
}
.team-av img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-size: 16px; font-weight: 700; color: var(--g900); }
.team-pos  { font-size: 13px; color: var(--g600); margin-top: 3px; }

/* SETTINGS */
.settings-grid { display: grid; grid-template-columns: 210px 1fr; gap: 18px; }
.smenu { background: white; border: 1px solid var(--s200); border-radius: var(--radius); overflow: hidden; }
.smitem {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 18px; font-size: 14px; font-weight: 600; color: var(--g600);
  border-bottom: 1px solid var(--s100); transition: all .12s;
}
.smitem:last-child { border-bottom: none; }
.smitem:hover { background: var(--s50); color: var(--g800); padding-left: 22px; }
.smitem.on { background: var(--y100); color: var(--y600); font-weight: 800; }
.sform { background: white; border: 1px solid var(--s200); border-radius: var(--radius); padding: 26px; }
.ssec { margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--s100); }
.ssec:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ssec-title { font-size: 15px; font-weight: 800; color: var(--g800); margin-bottom: 18px; }
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ORG CARDS */
.org-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.org-card {
  background: white; border: 1px solid var(--s200);
  border-radius: var(--radius); overflow: hidden; transition: all .2s;
}
.org-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.org-card-top { height: 5px; }
.org-card-body { padding: 20px; }
.org-logo {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 14px;
}
.org-name { font-size: 16px; font-weight: 800; color: var(--g900); }
.org-type { font-size: 12px; color: var(--g600); margin-top: 3px; margin-bottom: 14px; }

/* TERMINAL BLOCK */
.terminal {
  background: var(--g900); border-radius: var(--radius); padding: 20px 22px;
  font-family: var(--mono); font-size: 13px; color: var(--y300); line-height: 2;
}
.terminal .cmd { color: rgba(255,255,255,.3); }
.terminal .out { color: white; }
.terminal .cursor { animation: blink 1s step-end infinite; }

/* BAR CHART */
.brow { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.bname { width: 100px; font-size: 13px; color: var(--g600); flex-shrink: 0; font-weight: 500; }
.btrack { flex: 1; background: var(--s200); height: 8px; border-radius: 4px; overflow: hidden; }
.bfill  { height: 100%; border-radius: 4px; transition: width .7s ease; }
.bpct   { width: 40px; text-align: right; font-size: 13px; font-weight: 700; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 90px 20px; color: var(--g600); }
.empty-state i  { font-size: 52px; color: var(--s300); display: block; margin-bottom: 18px; }
.empty-title    { font-size: 19px; font-weight: 800; color: var(--g700); margin-bottom: 9px; }
.empty-sub      { font-size: 14px; }

/* TOGGLE */
.toggle {
  width: 42px; height: 24px; background: var(--s200);
  border-radius: 12px; position: relative; cursor: pointer; transition: .2s; flex-shrink: 0;
}
.toggle.on { background: var(--y400); }
.toggle::after {
  content: ''; position: absolute;
  width: 20px; height: 20px; background: white;
  border-radius: 50%; top: 2px; left: 2px; transition: .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.toggle.on::after { left: 20px; }

/* LAYOUT */
.two-col    { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-grid{ display: grid; grid-template-columns: 1fr 300px; gap: 18px; }

/* RESPONSIVE */
@media (max-width: 1200px) {
  .stats-row   { grid-template-columns: 1fr 1fr; }
  .org-cards   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .pcards      { grid-template-columns: 1fr; }
  .team-grid   { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .app-content { padding: 16px; }
  :root { font-size: 14px; }
}

/* ══════════════════════════════════════════════
   LOGIN APOCALYPSE
══════════════════════════════════════════════ */

@keyframes loginShake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-6px); }
  80%  { transform: translateX(6px); }
  100% { transform: translateX(0); }
}

.login-error-shake {
  animation: loginShake .45s ease;
}

@keyframes glitchDestroy {
  0% {
    transform: scale(1) rotate(0deg);
    filter: blur(0);
    opacity: 1;
  }

  20% {
    transform: scale(1.02) rotate(-1deg);
    filter: hue-rotate(90deg);
  }

  40% {
    transform: scale(.98) rotate(1deg);
    filter: blur(2px);
  }

  60% {
    transform: scale(1.04) rotate(-2deg);
    filter: invert(1);
  }

  100% {
    transform: scale(.4) rotate(14deg);
    filter: blur(20px);
    opacity: 0;
  }
}

.meltdown {
  animation: glitchDestroy 1.4s cubic-bezier(.34,1.56,.64,1) forwards;
}

@keyframes eraseWorld {
  0% {
    opacity: 1;
    filter: blur(0);
  }

  100% {
    opacity: 0;
    filter: blur(16px);
  }
}

.erase-world {
  animation: eraseWorld 2s ease forwards;
}

.sudo-apocalypse-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  background:
    radial-gradient(circle at center,
      rgba(0,0,0,.92),
      rgba(0,0,0,.98));

  display: flex;
  align-items: center;
  justify-content: center;

  animation: fadeIn .5s ease;
}

.sudo-apocalypse-text {
  text-align: center;
  color: white;
  font-family: var(--mono);
}

.sudo-apocalypse-title {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--re600);

  text-shadow:
    0 0 10px rgba(255,0,0,.5),
    0 0 30px rgba(255,0,0,.3);

  margin-bottom: 20px;

  animation: pulse 1.5s infinite;
}

.sudo-apocalypse-sub {
  font-size: 20px;
  color: white;
  margin-bottom: 10px;
}

.sudo-apocalypse-sub2 {
  font-size: 14px;
  color: rgba(255,255,255,.5);
}

.sudo-destroy {
  overflow: hidden;
}

.sudo-destroy::before {
  content: '';

  position: fixed;
  inset: 0;
  pointer-events: none;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.03),
      rgba(255,255,255,.03) 1px,
      transparent 1px,
      transparent 3px
    );

  z-index: 9999;

  animation: pulse .15s infinite;
}

/* ══════════════════════════════════════════════
   ULTRA MODE
══════════════════════════════════════════════ */

.ultra-mode {
  background: black !important;
  overflow: hidden;
}

.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: 99990;
  pointer-events: none;
}

.ultra-terminal {

  position: fixed;
  inset: 0;

  z-index: 99995;

  padding: 60px;

  color: #00ff66;

  font-family: monospace;

  background: rgba(0,0,0,.45);

  overflow: hidden;
}

.kernel-title {

  font-size: 48px;

  font-weight: 800;

  color: #ff0033;

  margin-bottom: 30px;

  text-shadow:
    0 0 10px rgba(255,0,0,.8),
    0 0 30px rgba(255,0,0,.5);

  animation: pulse 1s infinite;
}

.panic-line {

  font-size: 18px;

  margin-bottom: 10px;

  opacity: 0;

  animation:
    fadeIn .2s forwards,
    blink 1s step-end infinite;
}

.ultra-final {

  position: fixed;

  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  z-index: 99999;

  text-align: center;

  color: white;

  font-family: var(--mono);

  font-size: 54px;

  font-weight: 800;

  letter-spacing: 4px;

  text-shadow:
    0 0 10px rgba(255,255,255,.5),
    0 0 40px rgba(255,255,255,.3);

  animation: pulse 1.5s infinite;
}

.ultra-final span {

  display: block;

  margin-top: 16px;

  font-size: 16px;

  opacity: .5;

  letter-spacing: 1px;
}

.screen-glitch {

  animation: ultraGlitch .12s linear;
}

@keyframes ultraGlitch {

  0% {
    transform: translate(0);
    filter: hue-rotate(0deg);
  }

  20% {
    transform: translate(-6px, 3px);
  }

  40% {
    transform: translate(6px, -3px);
  }

  60% {
    transform: translate(-3px, 2px);
    filter: invert(1);
  }

  100% {
    transform: translate(0);
    filter: hue-rotate(40deg);
  }
}

.sudo-crack-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  color: #00ff66;
  font-family: monospace;
  padding: 40px;
  z-index: 99999;
}

.crack-bar {
  height: 6px;
  background: #111;
  margin-top: 20px;
}

.crack-fill {
  height: 100%;
  width: 0%;
  background: #00ff66;
  transition: width 0.3s;
}

.sudo-progress-lock {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: #111;
  color: #fff;
  padding: 15px;
  border-radius: 10px;
}
.lock-bar {
  height: 6px;
  background: #222;
}
.lock-fill {
  height: 100%;
  width: 0%;
  background: red;
}

.sudo-refreshing {
  filter: blur(6px) brightness(0.4);
  transition: all 0.6s ease;
}