/* ============================================================
   Portal Interno – Report  |  Design System
   ============================================================ */

:root {
  --sidebar-w: 256px;
  --topbar-h: 60px;

  /* Brand */
  --primary-950: #07152a;
  --primary-900: #0d2137;
  --primary-800: #0f2c47;
  --primary-700: #133b5c;
  --primary-600: #1b4f8a;
  --primary-500: #2563eb;
  --primary-400: #3b82f6;
  --primary-100: #dbeafe;
  --primary-50:  #eff6ff;

  --accent:       #f04e23;
  --accent-hover: #d63b0f;
  --accent-light: #fef3f0;

  /* Semantic */
  --success:       #10b981;
  --success-light: #d1fae5;
  --warning:       #f59e0b;
  --warning-light: #fef3c7;
  --danger:        #ef4444;
  --danger-light:  #fee2e2;

  /* Neutrals */
  --gray-900: #1e293b;
  --gray-800: #334155;
  --gray-700: #475569;
  --gray-600: #64748b;
  --gray-500: #94a3b8;
  --gray-400: #cbd5e1;
  --gray-300: #e2e8f0;
  --gray-200: #f1f5f9;
  --gray-100: #f8fafc;
  --white:    #ffffff;

  /* Surfaces */
  --sidebar-bg:        var(--primary-950);
  --sidebar-text:      #8fa8bf;
  --sidebar-hover:     rgba(255,255,255,.07);
  --sidebar-active-bg: var(--primary-600);
  --content-bg:        #f0f2f5;
  --card-bg:           var(--white);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.09), 0 8px 10px rgba(0,0,0,.04);

  /* Misc */
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: .18s ease;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: var(--font); background: var(--content-bg); color: var(--gray-900); font-size: 14px; line-height: 1.5; overflow: hidden; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }

/* ── Layout ── */
.app { display: flex; height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  transition: width var(--transition);
  z-index: 200;
  box-shadow: 2px 0 16px rgba(0,0,0,.2);
}
.sidebar.collapsed { width: 68px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  min-height: 68px;
  overflow: hidden;
}
.brand-mark {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  flex-shrink: 0;
  letter-spacing: -.5px;
}
.brand-text { overflow: hidden; white-space: nowrap; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; }
.brand-sub  { color: var(--sidebar-text); font-size: 11px; margin-top: 1px; }

.nav-wrap { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-label {
  padding: 10px 18px 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  white-space: nowrap;
}
.sidebar.collapsed .nav-label { opacity: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 16px;
  color: var(--sidebar-text);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  border-radius: 0;
  user-select: none;
}
.nav-item:hover  { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active-bg); color: #fff; }
.nav-item.active::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: background var(--transition);
}
.nav-item.active .nav-icon { background: rgba(255,255,255,.15); }

.nav-text  { font-size: 13px; font-weight: 500; flex: 1; }
.nav-badge {
  background: var(--accent);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 10px;
  flex-shrink: 0;
}

.sidebar-user {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px;
  overflow: hidden;
}
.u-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.u-name  { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-role  { color: var(--sidebar-text); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Main wrapper ── */
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── Topbar ── */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  display: flex; align-items: center;
  padding: 0 24px; gap: 14px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  z-index: 100;
}
.topbar-menu-btn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  font-size: 20px; color: var(--gray-600);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.topbar-menu-btn:hover { background: var(--gray-200); }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--gray-900); flex: 1; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-200);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 7px 14px;
  width: 260px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
  background: var(--white);
}
.search-box span { font-size: 15px; color: var(--gray-500); flex-shrink: 0; }
.search-box input { border: none; background: transparent; font-size: 13px; color: var(--gray-900); outline: none; width: 100%; font-family: var(--font); }
.search-box input::placeholder { color: var(--gray-500); }

.icon-btn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  border-radius: 8px; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  position: relative;
  color: var(--gray-700);
}
.icon-btn:hover { background: var(--gray-200); }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--white);
}
.topbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-500), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Content ── */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 30px;
}

/* ── Page sections ── */
.page { display: none; }
.page.active { display: block; }

/* ── Welcome banner ── */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary-950) 0%, var(--primary-700) 55%, var(--primary-500) 100%);
  border-radius: var(--radius-lg);
  padding: 26px 30px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.welcome-banner::before {
  content: '';
  position: absolute; right: -50px; top: -50px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.welcome-banner::after {
  content: '';
  position: absolute; right: 100px; bottom: -70px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.wb-text h2 { font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.wb-text p  { font-size: 13px; opacity: .8; max-width: 460px; line-height: 1.65; }
.wb-date { text-align: right; opacity: .9; position: relative; z-index: 1; }
.wb-day   { font-size: 38px; font-weight: 800; line-height: 1; }
.wb-full  { font-size: 12px; opacity: .7; margin-top: 3px; }

/* ── Stats row ── */
.stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}
.stat-val { font-size: 26px; font-weight: 800; color: var(--gray-900); line-height: 1; margin-bottom: 4px; }
.stat-lbl { font-size: 12px; color: var(--gray-600); font-weight: 500; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; margin-top: 5px;
  padding: 2px 7px; border-radius: 5px;
}
.chip-up    { background: var(--success-light); color: #065f46; }
.chip-down  { background: var(--danger-light);  color: #991b1b; }
.chip-info  { background: var(--primary-100);   color: var(--primary-700); }
.chip-warn  { background: var(--warning-light); color: #92400e; }

/* ── Main grid ── */
.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.dept-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }

/* ── Department cards ── */
.dept-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 18px;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column; gap: 10px;
}
.dept-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-400); }
.dept-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.dept-name { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.dept-desc { font-size: 12px; color: var(--gray-600); line-height: 1.55; }

/* ── Card base ── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title {
  font-size: 14px; font-weight: 600; color: var(--gray-900);
  display: flex; align-items: center; gap: 8px;
}
.card-title-icon { font-size: 16px; }
.card-more { font-size: 12px; color: var(--primary-500); font-weight: 500; cursor: pointer; }
.card-more:hover { text-decoration: underline; }

/* ── News feed ── */
.news-item {
  display: flex; gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: opacity var(--transition);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:hover { opacity: .75; }
.news-cal {
  width: 44px; height: 50px;
  background: var(--primary-50);
  border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.news-day   { font-size: 18px; font-weight: 800; color: var(--primary-600); line-height: 1; }
.news-month { font-size: 9px; text-transform: uppercase; color: var(--gray-600); font-weight: 600; letter-spacing: .06em; }
.news-tag   { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.news-ttl   { font-size: 13px; font-weight: 600; color: var(--gray-900); line-height: 1.4; margin-bottom: 3px; }
.news-expt  { font-size: 12px; color: var(--gray-600); line-height: 1.5; }

/* ── Task items ── */
.task-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--gray-200);
}
.task-item:last-child { border-bottom: none; padding-bottom: 0; }
.task-check {
  width: 17px; height: 17px;
  border: 2px solid var(--gray-400);
  border-radius: 4px;
  flex-shrink: 0; margin-top: 1px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.task-check:hover { border-color: var(--primary-500); }
.task-check.done  { background: var(--success); border-color: var(--success); color: #fff; font-size: 10px; }
.task-body { flex: 1; }
.task-ttl  { font-size: 13px; font-weight: 500; color: var(--gray-900); margin-bottom: 3px; }
.task-ttl.done-text { text-decoration: line-through; color: var(--gray-500); }
.task-meta { font-size: 11px; color: var(--gray-500); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag {
  padding: 2px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
}
.tag-urgent  { background: var(--danger-light);  color: var(--danger); }
.tag-warning { background: var(--warning-light); color: #92400e; }
.tag-info    { background: var(--primary-100);   color: var(--primary-600); }
.tag-success { background: var(--success-light); color: #065f46; }
.tag-neutral { background: var(--gray-200);      color: var(--gray-700); }

/* ── Birthdays ── */
.bday-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 0; border-bottom: 1px solid var(--gray-200);
}
.bday-item:last-child { border-bottom: none; }
.bday-av {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.bday-name { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.bday-dept { font-size: 11px; color: var(--gray-500); }
.bday-date { font-size: 12px; font-weight: 600; color: var(--accent); margin-left: auto; flex-shrink: 0; }

/* ── Countdown ── */
.countdown-card {
  background: linear-gradient(135deg, var(--accent), #c73b0e);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cd-event { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.cd-date  { font-size: 11px; opacity: .8; }
.cd-days  { font-size: 30px; font-weight: 800; line-height: 1; text-align: right; }
.cd-lbl   { font-size: 10px; opacity: .8; text-align: right; }

/* ── Section banner ── */
.section-banner {
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: #fff;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.section-banner::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,255,255,.07);
}
.sb-icon { font-size: 32px; margin-bottom: 10px; position: relative; z-index: 1; }
.sb-title { font-size: 18px; font-weight: 700; margin-bottom: 5px; position: relative; z-index: 1; }
.sb-sub   { font-size: 13px; opacity: .85; line-height: 1.65; max-width: 560px; position: relative; z-index: 1; }

.sb-ti    { background: linear-gradient(135deg, #133b5c, #2563eb); }
.sb-fin   { background: linear-gradient(135deg, #064e3b, #10b981); }
.sb-rh    { background: linear-gradient(135deg, #4c1d95, #a855f7); }
.sb-si    { background: linear-gradient(135deg, #78350f, #f59e0b); }
.sb-neg   { background: linear-gradient(135deg, #0d2137, #1b4f8a); }
.sb-est   { background: linear-gradient(135deg, #881337, #f43f5e); }
.sb-con   { background: linear-gradient(135deg, #1e293b, #475569); }
.sb-doc   { background: linear-gradient(135deg, #134e4a, #14b8a6); }
.sb-tasks { background: linear-gradient(135deg, #4c1d95, #7c3aed); }

/* ── Feature cards ── */
.feat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 24px; }
.feat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.feat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feat-icon-wrap {
  width: 50px; height: 50px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.feat-card h3 { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.feat-card p  { font-size: 12.5px; color: var(--gray-600); line-height: 1.6; flex: 1; }

/* ── Quick links ── */
.qlink {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--card-bg);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
}
.qlink:hover { border-color: var(--primary-400); background: var(--primary-50); transform: translateX(2px); }
.qlink-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.qlink-title { font-size: 13px; font-weight: 600; }
.qlink-sub   { font-size: 11px; color: var(--gray-500); }
.qlink-arr   { margin-left: auto; color: var(--gray-400); font-size: 13px; }

/* ── Person cards ── */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; }
.person-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.person-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.p-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 20px;
}
.p-name { font-size: 13px; font-weight: 600; color: var(--gray-900); margin-bottom: 3px; }
.p-role { font-size: 11px; color: var(--gray-600); margin-bottom: 3px; }
.p-dept { font-size: 10px; color: var(--gray-500); }

/* ── Accordion / FAQ ── */
.faq-item { border-bottom: 1px solid var(--gray-200); }
.faq-q {
  padding: 14px 0;
  font-size: 14px; font-weight: 500; color: var(--gray-900);
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  user-select: none;
  transition: color var(--transition);
}
.faq-q:hover { color: var(--primary-600); }
.faq-arr { color: var(--gray-500); font-size: 11px; transition: transform var(--transition); flex-shrink: 0; }
.faq-item.open .faq-arr { transform: rotate(180deg); }
.faq-a {
  font-size: 13px; color: var(--gray-700); line-height: 1.7;
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}
.faq-item.open .faq-a { max-height: 600px; padding-bottom: 14px; }

/* ── Tabs ── */
.tabs {
  display: flex; gap: 3px;
  background: var(--gray-200);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  padding: 7px 16px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--gray-600);
  transition: all var(--transition);
  white-space: nowrap;
}
.tab.active { background: var(--white); color: var(--gray-900); font-weight: 600; box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  text-decoration: none;
}
.btn-primary { background: var(--primary-500); color: #fff; }
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.35); }
.btn-accent  { background: var(--accent); color: #fff; }
.btn-accent:hover  { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(240,78,35,.35); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-300); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Badge / chip ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 11px; font-weight: 600;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-danger  { background: var(--danger-light);  color: #991b1b; }
.badge-info    { background: var(--primary-100);   color: var(--primary-700); }
.badge-neutral { background: var(--gray-200);      color: var(--gray-700); }

/* ── Table ── */
.tbl-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--gray-300); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); background: var(--gray-100); border-bottom: 1px solid var(--gray-300); }
.tbl td { padding: 12px 14px; font-size: 13px; color: var(--gray-700); border-bottom: 1px solid var(--gray-200); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--gray-100); }

/* ── Document list ── */
.doc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  background: var(--card-bg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.doc-item:hover { background: var(--gray-100); border-color: var(--gray-300); }
.doc-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.doc-title { font-size: 13.5px; font-weight: 600; color: var(--gray-900); margin-bottom: 3px; }
.doc-meta  { font-size: 11px; color: var(--gray-500); }
.doc-arr   { margin-left: auto; color: var(--gray-400); font-size: 14px; }

/* ── Info box (machine) ── */
.info-row {
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  display: flex; align-items: center; gap: 13px;
  margin-bottom: 8px;
  border: 1px solid var(--gray-200);
}
.info-icon { font-size: 22px; flex-shrink: 0; }
.info-lbl  { font-size: 11px; color: var(--gray-600); font-weight: 500; margin-bottom: 2px; }
.info-val  { font-size: 14px; font-weight: 600; color: var(--gray-900); font-family: 'Courier New', monospace; }

/* ── Progress ── */
.progress { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--primary-500); transition: width .7s ease; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 90%; max-width: 520px;
  box-shadow: var(--shadow-xl);
  transform: translateY(18px);
  transition: transform var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.modal-close  { width: 28px; height: 28px; border: none; background: var(--gray-100); border-radius: 6px; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.modal-close:hover { background: var(--gray-200); }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-lbl   { display: block; font-size: 11px; font-weight: 700; color: var(--gray-700); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-ctrl  { width: 100%; padding: 9px 13px; border: 1px solid var(--gray-300); border-radius: 8px; font-size: 13px; color: var(--gray-900); font-family: var(--font); outline: none; background: var(--white); transition: border-color var(--transition), box-shadow var(--transition); }
.form-ctrl:focus { border-color: var(--primary-400); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea.form-ctrl { resize: vertical; min-height: 80px; }
select.form-ctrl { cursor: pointer; }

/* ── Toast ── */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--gray-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-xl);
  display: flex; align-items: center; gap: 10px;
  animation: toastIn .3s ease forwards;
  max-width: 340px;
  min-width: 220px;
}
.toast.t-success { background: var(--success); }
.toast.t-warning { background: #b45309; }
.toast.t-danger  { background: var(--danger); }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Helpers ── */
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.text-sm   { font-size: 12px; }
.text-muted{ color: var(--gray-500); }
.divider   { height: 1px; background: var(--gray-200); margin: 16px 0; }
.section-lbl {
  font-size: 15px; font-weight: 700; color: var(--gray-900);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* ── Responsive ── */
@media (max-width: 1280px) {
  .dept-grid { grid-template-columns: repeat(3,1fr); }
  .feat-grid { grid-template-columns: repeat(2,1fr); }
  .stats-row { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 1024px) {
  .home-grid { grid-template-columns: 1fr; }
  .dept-grid { grid-template-columns: repeat(2,1fr); }
  .grid-3    { grid-template-columns: repeat(2,1fr); }
  .wb-date   { display: none; }
}
@media (max-width: 640px) {
  .dept-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .search-box { display: none; }
}
