/* =========================================
   DEVIXA — style.css
   Industrial precision dark UI
   Fonts: Syne (display) + DM Sans (body)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
  /* Core palette */
  --red:       #E02020;
  --red-dim:   #B81818;
  --red-glow:  rgba(224,32,32,0.18);
  --red-soft:  rgba(224,32,32,0.08);

  --bg:        #0C0C0C;
  --bg2:       #111111;
  --surface:   #161616;
  --surface2:  #1E1E1E;
  --surface3:  #262626;
  --border:    rgba(255,255,255,0.06);
  --border2:   rgba(255,255,255,0.11);

  --text:      #E2E2E2;
  --text-soft: #888;
  --text-muted:#555;
  --white:     #FFFFFF;

  --sidebar-w: 220px;
  --header-h:  0px;

  --font-ui: 'Inter', system-ui, sans-serif;
  --font-hd: 'Rajdhani', sans-serif;

  --r:    8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --ease: cubic-bezier(.4,0,.2,1);
  --t:    0.18s;
  --shadow: 0 4px 24px rgba(0,0,0,0.6);
}

html, body {
  height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: var(--font-ui); font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: #444; }

/* ===== AUTH ===== */
#auth-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
#auth-overlay.hidden { display: none; }

.auth-scene {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.auth-scene::before {
  content: 'DEVIXA';
  position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-hd); font-size: 220px; font-weight: 800;
  color: rgba(255,255,255,0.018); letter-spacing: -8px; white-space: nowrap;
}
.auth-scene-line {
  position: absolute; left: 0; right: 0;
  height: 1px; background: var(--border);
}
.auth-scene-line:nth-child(2) { top: 33%; }
.auth-scene-line:nth-child(3) { top: 66%; }
.auth-accent {
  position: absolute;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,32,32,0.09) 0%, transparent 70%);
  top: -100px; left: -100px; pointer-events: none;
}
.auth-accent2 {
  position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(224,32,32,0.05) 0%, transparent 70%);
  bottom: -60px; right: 20%; pointer-events: none;
}

.auth-box {
  position: relative; z-index: 1;
  width: 420px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: 0 0 0 1px rgba(224,32,32,0.06), var(--shadow);
  animation: authIn .35s var(--ease);
}

.auth-logo-wrap {
  display: flex; align-items: center; justify-content: flex-start; margin-bottom: 28px;
}
.auth-logo-wrap img {
  height: 50px; width: auto; max-width: 220px;
  object-fit: contain; object-position: left center;
  mix-blend-mode: screen; filter: brightness(1.2) contrast(1.1);
}

.auth-h { font-family: var(--font-hd); font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 5px; }
.auth-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }

/* Steps */
.steps { display: flex; align-items: center; margin-bottom: 26px; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-muted); transition: color var(--t); }
.step.active { color: var(--white); }
.step.done   { color: var(--red); }
.step-n {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; flex-shrink: 0;
  transition: all var(--t);
}
.step.active .step-n { background: var(--red); border-color: var(--red); color: #fff; }
.step-ln { flex: 1; height: 1px; background: var(--border2); margin: 0 10px; }
.step-ln.active { background: var(--red); }

/* Form */
.fg { margin-bottom: 14px; }
.fg-row { display: grid; gap: 12px; }
.fg-row.c2 { grid-template-columns: 1fr 1fr; }
.fg-row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.fl {
  display: block; font-size: 10px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.fi {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 10px 12px;
  color: var(--text); font-family: var(--font-ui); font-size: 14px; outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.fi:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.fi::placeholder { color: var(--text-muted); }
.fi.err { border-color: #e05050; }
textarea.fi { resize: vertical; min-height: 80px; }
select.fi { cursor: pointer; }
select.fi option { background: var(--surface2); }

.fe { font-size: 11px; color: #e06060; margin-top: 5px; display: none; }
.fe.show { display: block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--r);
  font-family: var(--font-ui); font-size: 13px; font-weight: 500;
  cursor: pointer; border: none; white-space: nowrap;
  transition: all var(--t); letter-spacing: 0.2px;
}
.btn-red  { background: var(--red); color: #fff; }
.btn-red:hover  { background: var(--red-dim); transform: translateY(-1px); box-shadow: 0 4px 16px var(--red-glow); }
.btn-red:active { transform: none; }
.btn-red:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--border2); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-surf  { background: var(--surface2); color: var(--text); border: 1px solid var(--border2); }
.btn-surf:hover { border-color: var(--border2); background: var(--surface3); }
.btn-danger { background: rgba(224,32,32,0.08); color: var(--red); border: 1px solid rgba(224,32,32,0.2); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-full { width: 100%; margin-top: 6px; }
.btn-sm   { padding: 6px 13px; font-size: 12px; }
.btn-lg   { padding: 13px 26px; font-size: 15px; }
.btn-icon { padding: 8px; border-radius: var(--r); }

.auth-toggle { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-muted); }
.auth-toggle span { color: var(--red); cursor: pointer; font-weight: 500; }
.auth-toggle span:hover { text-decoration: underline; }

/* Code */
.code-wrap { display: flex; gap: 9px; justify-content: center; margin: 18px 0; }
.code-d {
  width: 48px; height: 56px; text-align: center;
  font-size: 20px; font-weight: 700; font-family: var(--font-hd);
  background: var(--surface2); border: 1.5px solid var(--border2);
  border-radius: var(--r); color: var(--white); outline: none;
  transition: all var(--t);
}
.code-d:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-glow); }
.code-d.on { border-color: rgba(224,32,32,0.4); }
.code-info { text-align: center; font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.code-info b { color: var(--white); }
.code-rsnd { color: var(--red); cursor: pointer; font-weight: 500; }
.code-rsnd:hover { text-decoration: underline; }
.code-rsnd.off { color: var(--text-muted); cursor: not-allowed; pointer-events: none; }

/* Pwd strength */
.pwd-bars { display: flex; gap: 4px; margin-top: 6px; }
.pwd-b { flex: 1; height: 3px; border-radius: 2px; background: var(--surface3); transition: background .3s; }
.pwd-b.w { background: #e05050; }
.pwd-b.m { background: #e09020; }
.pwd-b.s { background: #50c050; }

/* ===== APP SHELL ===== */
#app { display: none; height: 100vh; }
#app.visible { display: flex; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100vh; overflow: hidden;
  position: relative;
}
.sidebar::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(224,32,32,0.3) 40%, rgba(224,32,32,0.3) 60%, transparent);
  pointer-events: none;
}

.sb-logo {
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  height: 70px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: #000;
  overflow: hidden;
}
.sb-logo-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
}

.sb-nav { flex: 1; overflow-y: auto; padding: 10px 10px; }
.sb-nav::-webkit-scrollbar { display: none; }

.sb-section-lbl {
  font-size: 9px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-muted); padding: 12px 8px 6px; display: block;
}

.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r);
  font-size: 13px; font-weight: 400; color: var(--text-soft);
  cursor: pointer; transition: all var(--t);
  border: none; background: none; width: 100%; text-align: left;
  margin-bottom: 1px; position: relative;
}
.sb-item:hover { background: var(--surface2); color: var(--white); }
.sb-item.active {
  background: var(--red-soft);
  color: var(--white); font-weight: 500;
}
.sb-item.active::before {
  content: ''; position: absolute; left: 0; top: 25%; bottom: 25%;
  width: 2px; background: var(--red); border-radius: 0 2px 2px 0;
}
.sb-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; opacity: 0.75; }
.sb-item.active .sb-icon { opacity: 1; }
.sb-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center;
}

.sb-bottom {
  border-top: 1px solid var(--border);
  padding: 12px 10px;
  flex-shrink: 0;
}
.sb-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--r);
  cursor: pointer; transition: background var(--t);
  margin-bottom: 6px;
}
.sb-user:hover { background: var(--surface2); }
.sb-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--red); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hd); font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 500; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-role { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.role-chip { font-size: 9px; font-weight: 600; padding: 2px 6px; border-radius: 10px; letter-spacing: 0.5px; text-transform: uppercase; }
.rc-admin   { background: rgba(224,32,32,0.15); color: #ff6060; }
.rc-support { background: rgba(255,165,0,0.15);  color: #ffaa44; }
.rc-user    { background: rgba(80,200,80,0.12);  color: #60c060; }

.sb-logout-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--r);
  font-size: 12px; color: var(--text-muted);
  cursor: pointer; transition: all var(--t);
  border: none; background: none; width: 100%;
}
.sb-logout-btn:hover { color: var(--red); background: var(--red-soft); }

/* ===== MAIN AREA ===== */
.main-area {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: var(--bg2);
}

/* Page header bar */
.page-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px; border-bottom: 1px solid var(--border);
  background: var(--bg2); flex-shrink: 0;
  gap: 14px; flex-wrap: wrap;
}
.page-bar-left {}
.page-bar-title { font-family: var(--font-hd); font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: 0.5px; }
.page-bar-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.page-bar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Content scroll */
.page-body { flex: 1; overflow-y: auto; padding: 24px 28px; }

/* Pages */
.page { display: none; }
.page.active { display: block; animation: pgIn .22s var(--ease); }

/* ===== STAT ROW ===== */
.srow { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 22px; }
.sc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  position: relative; overflow: hidden;
}
.sc::after {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 80px; height: 80px; border-radius: 50%;
  background: currentColor; opacity: 0.03;
}
.sc-val { font-family: var(--font-hd); font-size: 28px; font-weight: 700; color: var(--white); line-height: 1; }
.sc-lbl { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.sc-accent { border-top: 2px solid transparent; }
.sc.red    .sc-val { color: var(--red); }
.sc.red    { border-top: 2px solid rgba(224,32,32,0.4); }
.sc.blue   .sc-val { color: #5599ff; }
.sc.blue   { border-top: 2px solid rgba(85,153,255,0.4); }
.sc.green  .sc-val { color: #44cc77; }
.sc.green  { border-top: 2px solid rgba(68,204,119,0.4); }
.sc.orange .sc-val { color: #ffaa44; }
.sc.orange { border-top: 2px solid rgba(255,170,68,0.4); }
.sc.purple .sc-val { color: #aa77ff; }
.sc.purple { border-top: 2px solid rgba(170,119,255,0.4); }

/* ===== TABLE ===== */
.tbl-wrap { border-radius: var(--r-lg); border: 1px solid var(--border); overflow-x: auto; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 11px 16px; background: var(--surface2);
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--t); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.018); }
tbody td { padding: 13px 16px; color: var(--text); vertical-align: middle; }
.tb  { color: var(--white) !important; font-weight: 500; }
.tm  { color: var(--text-muted) !important; font-size: 12px; }
.ts  { color: var(--text-soft) !important; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.b-new      { background: rgba(85,153,255,0.12);  color: #5599ff; }
.b-progress { background: rgba(255,170,68,0.12);  color: #ffaa44; }
.b-ready    { background: rgba(170,119,255,0.12); color: #aa77ff; }
.b-done     { background: rgba(68,204,119,0.12);  color: #44cc77; }
.b-canceled { background: rgba(120,120,120,0.1);  color: #777; }
.b-active   { background: rgba(68,204,119,0.12);  color: #44cc77; }
.b-fired    { background: rgba(120,120,120,0.1);  color: #777; }
.b-low      { background: rgba(255,170,68,0.12);  color: #ffaa44; }

/* Action icons */
.tact { display: flex; gap: 4px; align-items: center; }
.ia {
  width: 28px; height: 28px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer; border: none;
  transition: all var(--t); background: transparent; color: var(--text-muted);
}
.ia:hover { background: var(--surface2); color: var(--white); }
.ia.del:hover { background: rgba(224,32,32,0.1); color: var(--red); }
.ia.edit:hover { background: rgba(85,153,255,0.1); color: #5599ff; }

/* Inline action buttons (non-icon) */
.abt {
  padding: 4px 11px; border-radius: 6px;
  font-size: 11px; font-weight: 500; cursor: pointer; border: none;
  transition: all var(--t); white-space: nowrap;
}
.abt-support { background: rgba(255,170,68,0.1); color: #ffaa44; }
.abt-support:hover { background: rgba(255,170,68,0.2); }
.abt-user    { background: rgba(68,204,119,0.1); color: #44cc77; }
.abt-user:hover { background: rgba(68,204,119,0.2); }
.abt-block   { background: rgba(224,32,32,0.08); color: var(--red); }
.abt-block:hover { background: rgba(224,32,32,0.18); }

/* ===== SEARCH BAR ===== */
.sbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.sinp-w { position: relative; flex: 1; min-width: 200px; }
.sinp-w svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; width: 14px; height: 14px; }
.sinp {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 9px 13px 9px 33px;
  color: var(--text); font-family: var(--font-ui); font-size: 13px; outline: none;
  transition: border-color var(--t);
}
.sinp:focus { border-color: rgba(224,32,32,0.4); }
.sinp::placeholder { color: var(--text-muted); }

/* Filter chips */
.fchips { display: flex; gap: 4px; flex-wrap: wrap; }
.fchip {
  padding: 6px 14px; border-radius: var(--r);
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border: 1px solid var(--border); background: transparent;
  transition: all var(--t);
}
.fchip:hover { color: var(--white); }
.fchip.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ===== MODAL ===== */
.mo {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto; padding: 20px;
  animation: fadeIn .15s var(--ease);
}
.mo.hidden { display: none; }
.mo-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r-xl); padding: 28px;
  width: 100%; max-width: 540px; margin: auto;
  animation: moIn .22s var(--ease); position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.mo-box.lg { max-width: 700px; }
.mo-box.sm { max-width: 360px; }
.mo-title {
  font-family: var(--font-hd); font-size: 18px; font-weight: 700;
  color: var(--white); margin-bottom: 22px;
  padding-right: 28px;
}
.mo-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--surface2); border: none; color: var(--text-muted);
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: all var(--t); line-height: 1;
}
.mo-close:hover { background: var(--surface3); color: var(--white); }
.mo-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.mo-sec { font-size: 10px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-muted); margin: 18px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ===== TOAST ===== */
.toast-wrap { position: fixed; bottom: 22px; right: 22px; z-index: 9999; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r-lg); padding: 11px 16px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn .25s var(--ease); white-space: nowrap;
  display: flex; align-items: center; gap: 9px;
  min-width: 220px;
}
.toast::before { font-size: 15px; flex-shrink: 0; }
.toast.ok  { border-color: rgba(68,204,119,0.3); color: #44cc77; }
.toast.ok::before { content: '✓'; }
.toast.err { border-color: rgba(224,32,32,0.3);  color: #ff6060; }
.toast.err::before { content: '✕'; }
.toast.wrn { border-color: rgba(255,170,68,0.3); color: #ffaa44; }
.toast.wrn::before { content: '⚠'; }

/* ===== CARDS GRID ===== */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; }
.ccard {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  transition: border-color var(--t);
}
.ccard:hover { border-color: var(--border2); }

/* Employee card */
.emp-av {
  width: 40px; height: 40px; border-radius: 10px; background: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-hd); font-size: 17px; font-weight: 700; color: #fff;
  margin-bottom: 12px;
}
.emp-nm   { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 2px; }
.emp-pos  { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.emp-sal  { font-family: var(--font-hd); font-size: 22px; font-weight: 700; color: #44cc77; }
.emp-slbl { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.emp-acts { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

/* Service card */
.svc-nm  { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.svc-cat { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.svc-pr  { font-family: var(--font-hd); font-size: 20px; font-weight: 700; color: var(--red); }
.svc-dur { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.svc-dsc { font-size: 12px; color: var(--text-soft); margin-top: 10px; line-height: 1.5; }

/* Finance item */
.fi-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px 16px;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 6px; transition: border-color var(--t);
}
.fi-row:hover { border-color: var(--border2); }
.fi-amt { font-family: var(--font-hd); font-size: 17px; font-weight: 700; min-width: 120px; }
.fi-amt.inc { color: #44cc77; }
.fi-amt.exp { color: #ff6060; }
.fi-inf { flex: 1; min-width: 0; }
.fi-rsn { font-size: 13px; font-weight: 500; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.fi-acc { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--surface2); color: var(--text-soft); white-space: nowrap; }

/* Period tabs */
.ptabs { display: flex; gap: 3px; flex-wrap: wrap; margin-bottom: 18px; }
.ptab {
  padding: 6px 12px; border-radius: var(--r); font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer; border: 1px solid var(--border);
  background: transparent; transition: all var(--t);
}
.ptab:hover { color: var(--white); }
.ptab.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ===== CALENDAR ===== */
.cal-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-period { font-family: var(--font-hd); font-size: 16px; font-weight: 600; color: var(--white); min-width: 240px; text-align: center; }
.cal-g { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cal-head { display: grid; grid-template-columns: 54px repeat(7,1fr); background: var(--surface2); border-bottom: 1px solid var(--border); }
.cal-dl { padding: 10px 0; text-align: center; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.cal-dl .dn { font-size: 9px; color: var(--text-muted); margin-top: 1px; }
.cal-dl.tod { color: var(--red); }
.cal-row { display: grid; grid-template-columns: 54px repeat(7,1fr); border-bottom: 1px solid var(--border); }
.cal-row:last-child { border-bottom: none; }
.cal-rt { display: flex; align-items: flex-start; justify-content: flex-end; padding: 4px 10px 0 0; font-size: 10px; color: var(--text-muted); height: 52px; padding-top: 5px; }
.cal-cell { border-left: 1px solid var(--border); min-height: 52px; position: relative; transition: background var(--t); }
.cal-cell:hover { background: rgba(255,255,255,0.012); }
.cal-ev {
  position: absolute; left: 2px; right: 2px; border-radius: 5px;
  padding: 3px 6px; font-size: 11px; font-weight: 500; overflow: hidden;
  cursor: pointer; z-index: 2; transition: opacity var(--t);
  border-left: 2px solid rgba(0,0,0,0.25);
}
.cal-ev:hover { opacity: 0.82; }
.cal-ev-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-s { font-size: 10px; opacity: 0.75; margin-top: 1px; }

/* Color picker */
.clr-opts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; }
.clr-o {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all var(--t);
}
.clr-o:hover { transform: scale(1.15); }
.clr-o.on { border-color: var(--white); box-shadow: 0 0 0 2px rgba(255,255,255,0.25); }

/* ===== DASHBOARD ===== */
.dash-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: 26px 30px;
  margin-bottom: 22px; position: relative; overflow: hidden;
}
.dash-banner::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(to right, var(--red), transparent);
}
.dash-banner::after {
  content: 'DEVIXA'; position: absolute; right: -10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-hd); font-size: 80px; font-weight: 800;
  color: rgba(255,255,255,0.025); letter-spacing: -3px; pointer-events: none;
}
.dash-hname { font-family: var(--font-hd); font-size: 24px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.dash-sub { font-size: 12px; color: var(--text-muted); }

/* ===== SUPPORT ===== */
.sup-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; height: calc(100vh - 180px); }
.sup-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; }
.sup-list-hdr { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.sup-items { flex: 1; overflow-y: auto; padding: 6px; }
.sup-flt { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.ri { padding: 10px 12px; border-radius: var(--r); cursor: pointer; transition: background var(--t); margin-bottom: 2px; border: 1px solid transparent; }
.ri:hover { background: var(--surface2); }
.ri.on { background: var(--surface2); border-color: rgba(224,32,32,0.2); }
.ri-ttl { font-size: 13px; font-weight: 500; color: var(--white); display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.ri-mt  { font-size: 11px; color: var(--text-muted); }
.rdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.do { background: var(--red); }
.da { background: #ffaa44; }
.dc { background: #444; }
.dz { background: #333; }
.rep-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; overflow: hidden; }
.rep-empty { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--text-muted); font-size: 13px; }
.rep-hdr { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rep-msgs { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.mb { max-width: 68%; padding: 11px 14px; border-radius: 12px; font-size: 13px; line-height: 1.55; }
.mb-u { background: var(--surface2); border: 1px solid var(--border); align-self: flex-start; border-radius: 12px 12px 12px 4px; }
.mb-s { background: rgba(224,32,32,0.08); border: 1px solid rgba(224,32,32,0.15); align-self: flex-end; border-radius: 12px 12px 4px 12px; }
.mb-mt { font-size: 10px; color: var(--text-muted); margin-top: 5px; }
.rep-reply { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-end; }
.rep-inp { flex: 1; background: var(--surface2); border: 1px solid var(--border2); border-radius: var(--r); padding: 9px 12px; color: var(--text); font-family: var(--font-ui); font-size: 13px; outline: none; resize: none; min-height: 40px; max-height: 110px; transition: border-color var(--t); }
.rep-inp:focus { border-color: rgba(224,32,32,0.4); }

/* ===== SETTINGS ===== */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media(max-width:700px) { .set-grid { grid-template-columns: 1fr; } }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.set-title { font-family: var(--font-hd); font-size: 15px; font-weight: 600; color: var(--white); margin-bottom: 18px; }
.inf-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.inf-row:last-child { border-bottom: none; }
.inf-lbl { color: var(--text-muted); }
.inf-val { color: var(--white); font-weight: 500; }
.v-yes { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(68,204,119,0.1); color: #44cc77; }
.v-no  { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(224,32,32,0.1); color: #ff6060; }

/* Empty */
.empty { text-align: center; padding: 48px 20px; color: var(--text-muted); grid-column: 1/-1; }
.empty-ico { font-size: 34px; margin-bottom: 12px; opacity: 0.3; }
.empty-t { font-size: 14px; font-weight: 500; color: var(--text-soft); margin-bottom: 5px; }
.empty-s { font-size: 12px; }

/* Low stock row */
.ls-row { background: rgba(255,170,68,0.04) !important; }
.ls-row:hover { background: rgba(255,170,68,0.07) !important; }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes authIn  { from { opacity:0; transform:translateY(16px) } to { opacity:1; transform:none } }
@keyframes pgIn    { from { opacity:0; transform:translateY(6px)  } to { opacity:1; transform:none } }
@keyframes moIn    { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:none } }
@keyframes toastIn { from { opacity:0; transform:translateX(12px) } to { opacity:1; transform:none } }

/* ===== ORDER ROW NUMBER ===== */
.ord-num { font-family: var(--font-hd); font-weight: 700; color: var(--red); letter-spacing: 1px; font-size: 13px; }


/* ===== NOTIFICATIONS ===== */
.notif-wrap { position: relative; }
.sb-notif-row {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px; border-radius: var(--r);
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 12px;
  transition: background var(--t), color var(--t);
  text-align: left;
}
.sb-notif-row:hover { background: var(--surface2); color: var(--text); }
.notif-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 7px; height: 7px;
  background: var(--red);
  border-radius: 50%;
  border: 1.5px solid var(--bg);
}
.notif-dot.hidden { display: none; }
.notif-dropdown {
  position: fixed;
  bottom: 80px; left: 12px;
  width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  z-index: 999;
  box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 2px 8px rgba(0,0,0,.3);
  overflow: hidden;
  animation: moIn .18s var(--ease);
}
.notif-dropdown.hidden { display: none; }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.notif-header button {
  font-size: 11px; color: var(--text-muted);
  background: none; border: none; cursor: pointer; padding: 0;
}
.notif-header button:hover { color: var(--red); }
.notif-list { max-height: 300px; overflow-y: auto; }
.notif-item {
  padding: 11px 16px;
  font-size: 12px; color: var(--text); line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.notif-item:last-child { border-bottom: none; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ===== NOTES PAGE ===== */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  padding-top: 4px;
}
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.note-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--note-color, var(--red));
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.note-title {
  font-family: var(--font-hd);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.note-text {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px;
  font-size: 11px; color: var(--text-muted);
}
.note-del-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 14px; padding: 0 2px;
  transition: color .15s;
}
.note-del-btn:hover { color: var(--red); }

/* ===== PRINT ===== */
@media print {
  body * { visibility: hidden; }
  #print-area, #print-area * { visibility: visible; }
  #print-area {
    position: fixed; top: 0; left: 0;
    width: 100%; padding: 24px;
    background: #fff; color: #111;
    font-family: Arial, sans-serif;
  }
}

/* ===== ORDER MODAL XL ===== */
.mo-box.xl { max-width: 820px; width: 96vw; }

/* Service / Parts rows */
.svc-row, .part-row {
  display: grid;
  gap: 8px;
  align-items: end;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  position: relative;
}
.svc-row { grid-template-columns: 2fr 60px 90px 1.4fr 28px; }
.part-row { grid-template-columns: 2fr 70px 90px 28px; }
.svc-row .fl, .part-row .fl { font-size: 10px; margin-bottom: 3px; }
.row-del-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 7px; width: 28px; height: 32px;
  cursor: pointer; color: var(--text-muted); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; align-self: end;
}
.row-del-btn:hover { color: var(--red); border-color: var(--red); background: rgba(224,32,32,.07); }
.svc-pick-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px dashed var(--border);
  border-radius: 8px; padding: 7px 12px;
  font-size: 12px; color: var(--text-muted); cursor: pointer;
  transition: all .15s; width: 100%;
}
.svc-pick-btn:hover { border-color: var(--red); color: var(--red); background: rgba(224,32,32,.05); }

/* Totals */
.ord-total-row {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 6px 0 10px;
  font-size: 13px; color: var(--text-muted);
}
.ord-grand-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; margin: 8px 0 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px; font-weight: 600; color: var(--text);
}

/* Service picker list */
.svc-pick-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer; transition: all .15s;
}
.svc-pick-item:hover { border-color: var(--red); background: rgba(224,32,32,.05); }
.svc-pick-item .spi-name { font-size: 13px; font-weight: 500; color: var(--text); }
.svc-pick-item .spi-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.svc-pick-item .spi-price { font-family: var(--font-hd); font-weight: 700; color: var(--red); font-size: 14px; flex-shrink: 0; margin-left: 12px; }

/* Cal event colors by order status */
.cal-ev-new      { background: #2196F3 !important; color: #fff !important; }
.cal-ev-progress { background: #FFA500 !important; color: #111 !important; }
.cal-ev-ready    { background: #7C4DFF !important; color: #fff !important; }

/* Cal delete button */
.cal-ev-del {
  position: absolute; top: 3px; right: 4px;
  background: rgba(0,0,0,.25); border: none;
  border-radius: 4px; width: 16px; height: 16px;
  font-size: 9px; cursor: pointer; color: inherit;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s;
}
.cal-ev:hover .cal-ev-del { opacity: 1; }
.cal-ev { position: relative !important; }

/* ===== ADMIN DELETE BUTTON ===== */
.abt-del {
  background: rgba(224,32,32,0.1) !important;
  color: #ff6060 !important;
  border: 1px solid rgba(224,32,32,0.25) !important;
}
.abt-del:hover {
  background: rgba(224,32,32,0.22) !important;
}

/* ===== SALARY PAYMENT ===== */
.emp-ord-cb {
  width: 15px; height: 15px; cursor: pointer;
  accent-color: var(--red);
}

/* ===== ADMIN NOTIFICATION BROADCAST ===== */
.admin-notif-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.admin-notif-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-hd); font-size: 14px; font-weight: 600;
  color: var(--white); margin-bottom: 14px;
}
.admin-notif-body {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  align-items: start;
  margin-bottom: 12px;
}
.admin-notif-targets {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.admin-notif-footer {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
}
.admin-user-cb-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0;
  font-size: 12px; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.admin-user-cb-row:last-child { border-bottom: none; }
.admin-user-cb-row input[type=checkbox] { accent-color: var(--red); flex-shrink: 0; }
.admin-user-cb-row .au-name { font-weight: 500; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-cb-row .au-role { font-size: 10px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }

/* ===== DASHBOARD REDESIGN ===== */
.dash-about-title {
  font-family: var(--font-hd); font-size: 15px; font-weight: 700;
  color: var(--white); margin-bottom: 14px; letter-spacing: 0.2px;
}
.dash-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.dash-feat {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  transition: border-color .15s, transform .15s;
}
.dash-feat:hover { border-color: rgba(255,255,255,0.12); transform: translateY(-1px); }
.dash-feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-feat-title {
  font-size: 13px; font-weight: 600; color: var(--white);
  margin-bottom: 5px; font-family: var(--font-hd);
}
.dash-feat-desc { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* Premium block */
.dash-premium-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px 22px;
}
.dash-premium-header { margin-bottom: 16px; }
.dash-premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.dash-prem-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s;
}
.dash-prem-item:hover { border-color: rgba(255,215,0,0.2); }
.dash-prem-ico { font-size: 22px; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.dash-prem-name {
  font-size: 13px; font-weight: 600; color: var(--white);
  margin-bottom: 4px;
}
.dash-prem-desc { font-size: 11px; color: var(--text-muted); line-height: 1.55; }

/* ===== LANG SWITCHER ===== */
.auth-lang-sw {
  display: flex; gap: 6px; justify-content: center;
  margin-bottom: 20px;
}
.lang-btn {
  padding: 4px 12px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text-muted);
  font-size: 11px; font-weight: 600; cursor: pointer; letter-spacing: 0.5px;
  transition: all .15s;
}
.lang-btn:hover { border-color: rgba(255,255,255,0.15); color: var(--white); }
.lang-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* Settings lang switcher */
.lang-switcher { display: flex; gap: 8px; flex-wrap: wrap; }
.lang-btn-big {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .15s; flex: 1; min-width: 100px;
}
.lang-btn-big:hover { border-color: rgba(255,255,255,0.15); color: var(--white); }
.lang-btn-big.active { border-color: var(--red); background: rgba(224,32,32,0.1); color: var(--white); }
.lang-flag { font-size: 18px; }

/* ═══════════════════════════════════════
   SUPPORT v2
═══════════════════════════════════════ */
.sup-page-body { padding: 20px 28px !important; height: calc(100vh - 80px) !important; overflow: hidden !important; }
.sup-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; height: 100%; }

/* Left panel */
.sup-left { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.sup-stats-row { display: flex; gap: 8px; flex-shrink: 0; }
.sup-stat { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.sup-stat-n { font-size: 20px; font-weight: 800; font-family: var(--font-hd); color: var(--white); }
.sup-stat-l { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .5px; }
.sup-stat.open .sup-stat-n { color: #2196F3; }
.sup-stat.answered .sup-stat-n { color: #44cc77; }
.sup-stat.closed .sup-stat-n { color: var(--text-muted); }

.sup-tabs { display: flex; gap: 4px; flex-wrap: wrap; flex-shrink: 0; }
.sup-tab { padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap; }
.sup-tab:hover { color: var(--white); border-color: rgba(255,255,255,.15); }
.sup-tab.on { background: var(--red); border-color: var(--red); color: #fff; }

.sup-search-wrap { position: relative; flex-shrink: 0; }
.sup-search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 13px; height: 13px; color: var(--text-muted); pointer-events: none; }
.sup-search { width: 100%; padding: 8px 12px 8px 32px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--white); font-size: 12px; box-sizing: border-box; }
.sup-search:focus { outline: none; border-color: var(--red); }

.sup-list-meta { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.sup-cnt { font-size: 11px; color: var(--text-muted); }
.sup-sort { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-size: 11px; padding: 4px 8px; cursor: pointer; }

.sup-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.sup-empty-state { padding: 40px; text-align: center; }
.sup-unread-dot { display: inline-block; width: 7px; height: 7px; background: var(--red); border-radius: 50%; margin-left: 6px; vertical-align: middle; }

/* Ticket card */
.sup-ticket { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: all .15s; }
.sup-ticket:hover { border-color: rgba(255,255,255,.15); background: var(--surface2); }
.sup-ticket.active { border-color: var(--red); background: rgba(224,32,32,.08); }
.sup-ticket-top { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 6px; }
.sup-ticket-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.sup-ticket-info { flex: 1; min-width: 0; }
.sup-ticket-subj { font-size: 13px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-ticket-who { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.sup-ticket-status { font-size: 10px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.sup-ticket-preview { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.sup-ticket-time { font-size: 10px; color: var(--text-muted); }

/* Right detail panel */
.sup-right { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; min-height: 0; }
.rep-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; }
.rep-empty-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 24px; }
.rep-empty-title { font-size: 15px; font-weight: 600; color: var(--white); }
.rep-empty-sub { font-size: 12px; color: var(--text-muted); }

/* Detail header */
.rep-det-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.rep-det-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.rep-det-type { font-size: 12px; color: var(--text-muted); background: var(--surface2); padding: 3px 10px; border-radius: 20px; }
.rep-det-title { font-size: 17px; font-weight: 700; color: var(--white); font-family: var(--font-hd); margin-bottom: 4px; }
.rep-det-info { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.rep-det-acts { display: flex; gap: 7px; flex-wrap: wrap; }

/* Messages area */
.rep-msgs-area { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.msg-row { display: flex; gap: 10px; align-items: flex-start; }
.msg-row.msg-staff { flex-direction: row-reverse; }
.msg-av { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-family: var(--font-hd); font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.msg-bubble { max-width: 75%; }
.msg-row.msg-staff .msg-bubble { text-align: right; }
.msg-name { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.msg-row.msg-staff .msg-name { justify-content: flex-end; }
.msg-role-tag { background: rgba(224,32,32,.2); color: var(--red); font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.msg-text { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; font-size: 13px; color: var(--white); line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.msg-row.msg-staff .msg-text { background: rgba(224,32,32,.12); border-color: rgba(224,32,32,.25); }
.msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* Reply area */
.rep-reply-area { border-top: 1px solid var(--border); padding: 12px 16px; flex-shrink: 0; }
.rep-reply-input { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--white); font-size: 13px; padding: 10px 12px; resize: none; box-sizing: border-box; font-family: var(--font-body); }
.rep-reply-input:focus { outline: none; border-color: var(--red); }
.rep-reply-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* Rep type picker */
.rep-type-pick { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 16px; }
.rep-type-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; color: var(--text-muted); font-size: 12px; cursor: pointer; transition: all .15s; }
.rep-type-btn:hover { border-color: rgba(255,255,255,.15); color: var(--white); }
.rep-type-btn.active { border-color: var(--red); background: rgba(224,32,32,.1); color: var(--white); }
.rep-type-btn span:first-child { font-size: 20px; }

/* ═══════════════════════════════════════
   SUBSCRIPTION
═══════════════════════════════════════ */
.sub-features { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.sub-feat { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text); }
.sub-feat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
.sub-active-badge { display: flex; align-items: center; gap: 7px; background: rgba(68,204,119,.12); border: 1px solid rgba(68,204,119,.3); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #44cc77; font-weight: 600; }
.sub-inactive-badge { display: inline-block; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 12px; color: var(--text-muted); }
.sub-info-box { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.sub-price-tag { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.sub-price-amount { font-size: 32px; font-weight: 800; font-family: var(--font-hd); color: var(--red); }
.sub-price-period { font-size: 13px; color: var(--text-muted); }
.sub-success-icon { text-align: center; font-size: 48px; margin-bottom: 12px; }
.sub-step { }

/* Admin sub requests */
.sub-req-list { display: flex; flex-direction: column; gap: 10px; }
.sub-req-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.sub-req-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sub-req-name { font-size: 14px; font-weight: 600; color: var(--white); }
.sub-req-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sub-req-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ═══════════════════════════════════════
   SALARY: paid rows strikethrough
═══════════════════════════════════════ */
.sal-paid-row { opacity: .7; }
.sal-paid-row:hover { background: rgba(255,255,255,.02); }

/* ===== LANGUAGE SELECTOR OVERLAY ===== */
#lang-overlay {
  position: fixed; inset: 0; z-index: 9100;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.lang-btn {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1.5px solid var(--border2);
  border-radius: var(--r-lg); padding: 14px 18px;
  color: var(--text); cursor: pointer; width: 100%;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.lang-btn:hover { background: var(--surface2); border-color: rgba(255,255,255,0.18); }
.lang-btn-active { border-color: var(--red) !important; background: var(--surface2) !important; }
.lang-flag { font-size: 22px; flex-shrink: 0; }
.lang-btn-info { display: flex; flex-direction: column; align-items: flex-start; flex: 1; }
.lang-btn-name { font-weight: 700; font-size: 15px; color: var(--white); font-family: var(--font-hd); }
.lang-btn-native { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.lang-check { color: var(--red); font-weight: 700; font-size: 16px; margin-left: auto; transition: opacity .2s; }

/* ===== LANGUAGE SETTINGS ROW ===== */
.lang-settings-row {
  display: flex; gap: 8px; margin-bottom: 4px;
}
.lang-set-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); border: 1.5px solid var(--border2);
  border-radius: var(--r); padding: 8px 10px;
  color: var(--text); cursor: pointer; font-size: 12px; font-weight: 600;
  transition: border-color var(--t), background var(--t);
}
.lang-set-btn:hover { background: var(--surface2); }
.lang-set-btn.active { border-color: var(--red); color: var(--white); background: var(--surface2); }

/* ===== AUTH LANGUAGE BAR ===== */
.auth-lang-bar {
  position: absolute;
  top: 18px; right: 22px;
  display: flex; gap: 6px;
  z-index: 10;
}
.auth-lang-btn {
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 12px; font-weight: 600;
  padding: 5px 11px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  letter-spacing: 0.3px;
}
.auth-lang-btn:hover {
  background: var(--surface2);
  color: var(--white);
}
.auth-lang-btn.active {
  border-color: var(--red);
  color: var(--white);
  background: var(--surface2);
}

/* ===== FREEZE SCREEN ===== */
#freeze-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(12,12,12,0.97);
  display: flex; align-items: center; justify-content: center;
}
.freeze-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.freeze-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}
.freeze-title {
  font-family: var(--font-hd);
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.freeze-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}
.freeze-price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: var(--red-soft);
  border: 1px solid var(--red-glow);
  border-radius: var(--r);
  padding: 8px 20px;
  margin-bottom: 20px;
  font-family: var(--font-hd);
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
}
.freeze-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

/* ===== SUBSCRIPTION PLAN CARDS ===== */
.sub-plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.sub-plan-card {
  background: var(--surface2);
  border: 1.5px solid var(--border2);
  border-radius: var(--r-lg);
  padding: 16px 14px;
  cursor: pointer;
  position: relative;
  transition: border-color var(--t) var(--ease), background var(--t);
  text-align: center;
}
.sub-plan-card:hover { border-color: rgba(255,255,255,0.2); background: var(--surface3); }
.sub-plan-card.selected { border-color: var(--red); background: rgba(224,32,32,0.07); }
.sub-plan-card.best { border-color: #44cc77; }
.sub-plan-card.best.selected { border-color: #44cc77; background: rgba(68,204,119,0.07); }
.sub-plan-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: #44cc77; color: #000; font-size: 10px; font-weight: 700;
  padding: 2px 10px; border-radius: 20px; white-space: nowrap;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.sub-plan-period {
  font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500;
}
.sub-plan-price {
  font-family: var(--font-hd); font-size: 28px; font-weight: 800; color: var(--white);
  line-height: 1;
}
.sub-plan-price span { font-size: 13px; color: var(--text-muted); font-family: var(--font-ui); font-weight: 400; }
.sub-plan-per {
  font-size: 11px; color: var(--text-muted); margin-top: 5px;
}

/* ===== ADMIN SUB REQUEST CARDS ===== */
.sub-req-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.sub-req-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.sub-req-name { font-weight: 700; font-size: 14px; color: var(--white); }
.sub-req-email { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sub-req-date { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ===== INLINE SUBSCRIPTION CHAT ===== */
.sub-chat-msgs {
  min-height: 160px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.sub-chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.sub-chat-msg.mine { flex-direction: row-reverse; }
.sub-chat-av {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.sub-chat-bubble {
  max-width: 80%;
  background: var(--surface2);
  border-radius: 12px;
  padding: 8px 12px;
}
.sub-chat-msg.mine .sub-chat-bubble {
  background: var(--red-soft);
  border: 1px solid var(--red-glow);
}
.sub-chat-name {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 3px;
}
.sub-chat-text {
  font-size: 13px; color: var(--white); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
}
.sub-chat-time {
  font-size: 10px; color: var(--text-muted); margin-top: 4px;
}
.sub-chat-input-row {
  display: flex; gap: 8px; align-items: flex-end;
}
.sub-chat-input {
  flex: 1; resize: none; min-height: 38px; padding: 8px 12px;
  font-size: 13px; line-height: 1.4;
}

/* ===== ADMIN SUBSCRIPTION PANEL (2-col) ===== */
.adm-sub-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  min-height: 400px;
}
.adm-sub-left {
  overflow-y: auto;
  max-height: 600px;
}
.adm-sub-right {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.adm-sub-chat-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.adm-sub-chat-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.adm-sub-chat-title { font-weight: 700; color: var(--white); font-size: 14px; }
.adm-sub-right .sub-chat-msgs {
  flex: 1; border-radius: 0; border: none; border-bottom: 1px solid var(--border);
  min-height: 0; max-height: none; margin-bottom: 0;
}
.adm-sub-right .sub-chat-input-row {
  padding: 10px 12px; background: var(--surface);
}
.sub-req-card { cursor: pointer; transition: background var(--t) var(--ease); }
.sub-req-card:hover { background: var(--surface3); }
.sub-req-card.active-chat { border-color: var(--red); background: rgba(224,32,32,0.06); }

@media (max-width: 900px) {
  .adm-sub-layout { grid-template-columns: 1fr; }
  .adm-sub-right { min-height: 300px; }
}

/* ===== DASHBOARD ABOUT BLOCK ===== */
.dash-about-block {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.dash-about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.dash-about-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-about-version {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}
.dash-about-text {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 12px;
}
.dash-about-text:last-child { margin-bottom: 0; }

/* ===== SOCIAL BLOCK ===== */
.dash-social-block {
  margin-top: 20px;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
}
.dash-social-title {
  font-family: var(--font-hd);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}
.dash-social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dash-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--r-lg);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
  border: 1px solid transparent;
}
.dash-social-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.dash-social-btn.tg  { background: rgba(42,171,238,0.15); color: #2AABEE; border-color: rgba(42,171,238,0.3); }
.dash-social-btn.dc  { background: rgba(88,101,242,0.15); color: #7289DA; border-color: rgba(88,101,242,0.3); }
.dash-social-btn.yt  { background: rgba(255,0,0,0.12); color: #FF4444; border-color: rgba(255,0,0,0.25); }
.dash-social-copy {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
