:root {
  --primary: #0a6b4e;
  --primary-600: #08593f;
  --primary-700: #064631;
  --primary-50: #e8f4ef;
  --primary-100: #cfe8dd;
  --accent: #e2353f;
  --accent-50: #fdecee;
  --gold: #c9a227;
  --bg: #f2f5f3;
  --surface: #ffffff;
  --surface-2: #f7f9f8;
  --border: #e3e9e6;
  --text: #15241e;
  --text-2: #4b5d55;
  --muted: #7d8d86;
  --success: #12965f;
  --success-50: #e4f6ee;
  --warning: #c77800;
  --warning-50: #fff4e0;
  --danger: #d62f3a;
  --danger-50: #fdeaec;
  --info: #2563c9;
  --info-50: #e8effc;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 30, .06);
  --shadow: 0 4px 18px rgba(16, 40, 30, .07);
  --shadow-lg: 0 18px 50px rgba(6, 50, 35, .18);
  --sidebar-w: 264px;
  --font: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
svg.ic { width: 18px; height: 18px; flex-shrink: 0; }

/* ============ LOGIN ============ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--surface);
}
.login-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 85% 15%, rgba(226, 53, 63, .55) 0, rgba(226, 53, 63, 0) 32%),
    radial-gradient(circle at 10% 90%, rgba(201, 162, 39, .25) 0, rgba(201, 162, 39, 0) 40%),
    linear-gradient(150deg, #0b7a59 0%, #075a41 55%, #04392a 100%);
}
.login-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
.login-hero > * { position: relative; }
.brand { display: flex; align-items: center; gap: 14px; }
.emblem {
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px rgba(255,255,255,.18);
  flex-shrink: 0;
}
.emblem .sun { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 5px #fff, 0 0 0 3px var(--primary); }
.brand-text .t1 { font-size: 13px; opacity: .85; letter-spacing: .2px; }
.brand-text .t2 { font-size: 20px; font-weight: 700; line-height: 1.25; }
.hero-body h1 { font-size: 40px; line-height: 1.25; margin: 0 0 14px; font-weight: 700; }
.hero-body p { font-size: 16px; opacity: .88; max-width: 470px; margin: 0; }
.hero-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; max-width: 560px; }
.hero-feature {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px; padding: 14px;
  backdrop-filter: blur(6px);
}
.hero-feature .ic { width: 22px; height: 22px; margin-bottom: 6px; color: #ffd76a; }
.hero-feature b { display: block; font-size: 15px; }
.hero-feature span { font-size: 12.5px; opacity: .8; }
.hero-foot { font-size: 13px; opacity: .7; }

.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; background: var(--surface); }
.login-card { width: 100%; max-width: 410px; }
.login-card .mobile-brand { display: none; }
.login-card h2 { font-size: 28px; margin: 0 0 4px; }
.login-card .sub { color: var(--muted); margin: 0 0 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text-2); }
.field .req { color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-wrap .toggle-pass { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted); padding: 6px; display: grid; }
.input, .select, .textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap .input { padding-left: 42px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-50); }
.textarea { min-height: 84px; resize: vertical; }
.login-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 22px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.link { color: var(--primary); font-weight: 600; }
.link:hover { text-decoration: underline; }
.demo-hint {
  margin-top: 22px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--primary-50); border: 1px dashed var(--primary-100); font-size: 13.5px; color: var(--primary-700);
}
.demo-hint code { background: #fff; padding: 1px 7px; border-radius: 6px; font-weight: 600; }
.login-error { display: none; background: var(--danger-50); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.login-error.show { display: flex; gap: 8px; align-items: center; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 18px; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(10, 107, 78, .25); }
.btn-primary:hover { background: var(--primary-600); }
.btn-outline { background: var(--surface); border-color: var(--border); color: var(--text-2); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-block { width: 100%; padding: 13px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13.5px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.btn-icon:hover { color: var(--primary); border-color: var(--primary-100); background: var(--primary-50); }
.btn-icon.del:hover { color: var(--danger); border-color: var(--danger-50); background: var(--danger-50); }
.btn-icon svg.ic { width: 16px; height: 16px; }

/* ============ APP SHELL ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #075a41 0%, #04392a 100%);
  color: #dcefe6;
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform .25s ease;
}
.sidebar .brand { padding: 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .emblem { width: 44px; height: 44px; }
.sidebar .emblem .sun { width: 22px; height: 22px; box-shadow: inset 0 0 0 4px #fff, 0 0 0 2px var(--primary); }
.sidebar .brand-text .t1 { font-size: 11.5px; }
.sidebar .brand-text .t2 { font-size: 15.5px; color: #fff; }
.nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.nav-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .8px; opacity: .55; padding: 12px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 3px;
  color: #cfe5db; font-weight: 500; transition: background .15s, color .15s;
  position: relative;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: #fff; color: var(--primary-700); font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.nav a.active .ic { color: var(--primary); }
.nav a .badge-count { margin-left: auto; background: rgba(255,255,255,.14); padding: 0 8px; border-radius: 99px; font-size: 12px; }
.nav a.active .badge-count { background: var(--primary-50); color: var(--primary); }
.nav a .soon { margin-left: auto; font-size: 10.5px; background: rgba(255, 215, 106, .18); color: #ffd76a; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.clock-card { background: rgba(255,255,255,.07); border-radius: 12px; padding: 12px 14px; }
.clock-card .time { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.clock-card .date { font-size: 12.5px; opacity: .75; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 68px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 26px;
  position: sticky; top: 0; z-index: 30;
}
.menu-toggle { display: none; }
.search-global { position: relative; flex: 1; max-width: 380px; }
.search-global .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-global input { width: 100%; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 9px 12px 9px 40px; outline: none; }
.search-global input:focus { border-color: var(--primary); background: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.notif { position: relative; }
.notif .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 99px; border: 1px solid var(--border); background: #fff; cursor: pointer; position: relative; }
.user-chip .avatar { width: 34px; height: 34px; font-size: 13px; }
.user-chip .u-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.user-chip .u-role { font-size: 12px; color: var(--muted); line-height: 1.2; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 190px; padding: 6px; display: none;
}
.dropdown.show { display: block; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text-2); }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--text); }
.dropdown .logout { color: var(--danger); }

.content { padding: 26px; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0; line-height: 1.3; }
.breadcrumb { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin-bottom: 2px; }
.breadcrumb a:hover { color: var(--primary); }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.footer { padding: 16px 26px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ============ CARDS ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.card-head h3 { margin: 0; font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.card-head h3 .ic { color: var(--primary); }
.card-body { padding: 20px; }

.welcome {
  border-radius: var(--radius); padding: 24px 26px; color: #fff; margin-bottom: 22px;
  background:
    radial-gradient(circle at 92% 20%, rgba(226,53,63,.45) 0, rgba(226,53,63,0) 30%),
    linear-gradient(120deg, #0b7a59, #05452f);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.welcome h2 { margin: 0 0 4px; font-size: 22px; }
.welcome p { margin: 0; opacity: .85; }
.welcome .w-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.welcome .w-stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 16px; min-width: 120px; }
.welcome .w-stat b { font-size: 20px; display: block; line-height: 1.2; }
.welcome .w-stat span { font-size: 12.5px; opacity: .85; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat {
  padding: 18px; display: flex; gap: 14px; align-items: flex-start;
  position: relative; overflow: hidden;
}
.stat .s-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.stat .s-ic .ic { width: 22px; height: 22px; }
.stat .s-label { color: var(--muted); font-size: 13.5px; }
.stat .s-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat .s-meta { font-size: 12.5px; margin-top: 2px; color: var(--text-2); }
.stat .bar { height: 5px; background: var(--surface-2); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.stat .bar i { display: block; height: 100%; border-radius: 99px; }
.tone-green .s-ic { background: var(--success-50); color: var(--success); } .tone-green .bar i { background: var(--success); }
.tone-amber .s-ic { background: var(--warning-50); color: var(--warning); } .tone-amber .bar i { background: var(--warning); }
.tone-red .s-ic { background: var(--danger-50); color: var(--danger); } .tone-red .bar i { background: var(--danger); }
.tone-blue .s-ic { background: var(--info-50); color: var(--info); } .tone-blue .bar i { background: var(--info); }

.grid-2 { display: grid; grid-template-columns: 1.65fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Chart */
.chart { display: flex; align-items: flex-end; gap: 14px; height: 230px; padding: 10px 4px 0; border-bottom: 1px solid var(--border); position: relative; }
.chart .gridline { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--border); font-size: 11px; color: var(--muted); }
.chart .gridline span { position: absolute; top: -9px; left: -30px; width: 24px; text-align: right; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; position: relative; z-index: 1; }
.chart .stack { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 3px 3px; overflow: hidden; cursor: pointer; transition: filter .15s; }
.chart .stack:hover { filter: brightness(1.08); }
.chart .stack i { display: block; }
.chart .stack i + i { border-bottom: 2px solid #fff; }
.chart-labels { display: flex; gap: 14px; padding: 8px 4px 0; }
.chart-labels span { flex: 1; text-align: center; font-size: 12.5px; color: var(--muted); }
.chart-labels span b { display: block; color: var(--text-2); font-weight: 600; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tooltip { position: fixed; pointer-events: none; background: #10231b; color: #fff; padding: 8px 12px; border-radius: 8px; font-size: 13px; z-index: 100; display: none; box-shadow: var(--shadow-lg); }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { width: 170px; height: 170px; border-radius: 50%; position: relative; flex-shrink: 0; }
.donut::after { content: ""; position: absolute; inset: 22px; background: #fff; border-radius: 50%; }
.donut .center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; text-align: center; }
.donut .center b { font-size: 28px; display: block; line-height: 1.1; }
.donut .center span { font-size: 12.5px; color: var(--muted); }
.donut-legend { display: grid; gap: 10px; min-width: 170px; }
.donut-legend div { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.donut-legend i { width: 12px; height: 12px; border-radius: 4px; }
.donut-legend b { margin-left: auto; }

/* List rows */
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.list-row .meta { min-width: 0; flex: 1; }
.list-row .meta b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .meta span { font-size: 12.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .time { font-size: 13px; font-weight: 600; text-align: right; }
.list-row .time small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* Avatar */
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; position: relative;
  background: var(--primary-50); color: var(--primary); display: grid; place-items: center;
  font-weight: 700; font-size: 15px; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.avatar.lg { width: 120px; height: 120px; font-size: 40px; border: 5px solid #fff; box-shadow: var(--shadow); }
.av-1 { background: #e4f6ee; color: #0a7a52; } .av-2 { background: #e8effc; color: #2563c9; }
.av-3 { background: #fff4e0; color: #b46c00; } .av-4 { background: #f3e9fd; color: #7c3aed; }
.av-5 { background: #fdeaec; color: #c62834; } .av-6 { background: #e0f6f8; color: #0e7f8c; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.present { background: var(--success-50); color: var(--success); }
.badge.late { background: var(--warning-50); color: var(--warning); }
.badge.absent { background: var(--danger-50); color: var(--danger); }
.badge.leave { background: var(--info-50); color: var(--info); }
.badge.neutral { background: var(--surface-2); color: var(--muted); }
.badge.plain::before { display: none; }

/* ============ TABLE ============ */
.toolbar { display: flex; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.toolbar .search { position: relative; flex: 1; min-width: 220px; }
.toolbar .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search input { padding-left: 40px; }
.toolbar .select { width: auto; min-width: 190px; }
.view-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle button { border: 0; background: #fff; padding: 9px 12px; cursor: pointer; color: var(--muted); display: grid; }
.view-toggle button.on { background: var(--primary-50); color: var(--primary); }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 820px; }
.tbl th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fafcfb; }
.tbl .person { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.tbl .person b { display: block; font-size: 14.5px; line-height: 1.35; }
.tbl .person span { font-size: 12.5px; color: var(--muted); }
.tbl .person a:hover b { color: var(--primary); }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; }
.tbl .small { font-size: 13px; color: var(--text-2); }
.tbl .small div { white-space: nowrap; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; color: var(--primary-100); margin-bottom: 8px; }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; gap: 10px; }
.pager { display: flex; gap: 4px; }
.pager button { min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--text-2); }
.pager button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager button:disabled { opacity: .45; cursor: default; }

/* Card grid view */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; padding: 20px; }
.p-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 16px 16px; text-align: center; background: #fff; transition: box-shadow .2s, transform .2s, border-color .2s; position: relative; }
.p-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--primary-100); }
.p-card .avatar { width: 84px; height: 84px; margin: 0 auto 12px; font-size: 28px; box-shadow: 0 0 0 4px var(--primary-50); }
.p-card b { display: block; font-size: 15px; line-height: 1.35; }
.p-card .desig { font-size: 13px; color: var(--muted); margin: 2px 0 10px; min-height: 38px; }
.p-card .p-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.p-card .status-dot { position: absolute; top: 14px; right: 14px; }

/* ============ FORM ============ */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section-title { font-size: 15px; font-weight: 700; color: var(--primary-700); margin: 8px 0 14px; display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.form-layout { display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start; }
.photo-upload { text-align: center; padding: 26px 20px; }
.photo-upload .avatar { width: 140px; height: 140px; margin: 0 auto 14px; font-size: 44px; border: 4px dashed var(--primary-100); }
.photo-upload p { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.err-text { color: var(--danger); font-size: 12.5px; margin-top: 4px; display: none; }
.field.has-err .err-text { display: block; }
.field.has-err .input, .field.has-err .select { border-color: var(--danger); }
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-group label { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--text); margin: 0; }
.radio-group input { accent-color: var(--primary); }
.radio-group label:has(input:checked) { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }

/* ============ PROFILE ============ */
.profile-cover {
  height: 150px; border-radius: var(--radius) var(--radius) 0 0;
  background:
    radial-gradient(circle at 88% 30%, rgba(226,53,63,.5) 0, rgba(226,53,63,0) 28%),
    linear-gradient(120deg, #0b7a59, #04392a);
  position: relative;
}
.profile-head { display: flex; gap: 22px; align-items: flex-end; padding: 0 26px 22px; margin-top: -60px; position: relative; flex-wrap: wrap; }
.profile-head .info { flex: 1; min-width: 240px; padding-bottom: 4px; }
.profile-head h2 { margin: 0; font-size: 24px; line-height: 1.3; }
.profile-head .desig { color: var(--text-2); font-size: 15px; }
.profile-head .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.chip .ic { width: 14px; height: 14px; color: var(--primary); }
.tabs { display: flex; gap: 4px; padding: 0 20px; border-top: 1px solid var(--border); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 14px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
.profile-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; margin-top: 18px; }
.info-list { display: grid; gap: 0; }
.info-item { display: flex; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.info-item:last-child { border-bottom: 0; }
.info-item .ic-box { width: 36px; height: 36px; border-radius: 10px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.info-item .ic-box .ic { width: 17px; height: 17px; }
.info-item small { display: block; color: var(--muted); font-size: 12.5px; }
.info-item div > span { font-weight: 600; word-break: break-word; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.mini-stat { border-radius: 12px; padding: 14px; text-align: center; }
.mini-stat b { display: block; font-size: 24px; line-height: 1.2; }
.mini-stat span { font-size: 12.5px; }
.mini-stat.present { background: var(--success-50); color: var(--success); }
.mini-stat.late { background: var(--warning-50); color: var(--warning); }
.mini-stat.absent { background: var(--danger-50); color: var(--danger); }
.mini-stat.leave { background: var(--info-50); color: var(--info); }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.cal .day { aspect-ratio: 1 / .85; border-radius: 9px; display: grid; place-items: center; font-size: 13.5px; font-weight: 600; position: relative; cursor: default; }
.cal .day.present { background: var(--success-50); color: var(--success); }
.cal .day.late { background: var(--warning-50); color: var(--warning); }
.cal .day.absent { background: var(--danger-50); color: var(--danger); }
.cal .day.leave { background: var(--info-50); color: var(--info); }
.cal .day.weekend { background: repeating-linear-gradient(45deg, #f4f6f5, #f4f6f5 4px, #eceff0 4px, #eceff0 8px); color: #a7b3ad; }
.cal .day.future { background: var(--surface-2); color: #b9c4bf; }
.cal .day.today { outline: 2px solid var(--primary); outline-offset: 1px; }

/* ============ MODAL & TOAST ============ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 30, 22, .5); backdrop-filter: blur(3px); display: none; place-items: center; z-index: 90; padding: 16px; }
.modal-backdrop.show { display: grid; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 26px; text-align: center; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
.modal .m-ic { width: 60px; height: 60px; border-radius: 50%; background: var(--danger-50); color: var(--danger); display: grid; place-items: center; margin: 0 auto 14px; }
.modal .m-ic .ic { width: 28px; height: 28px; }
.modal h3 { margin: 0 0 6px; font-size: 19px; }
.modal p { margin: 0 0 22px; color: var(--text-2); }
.modal .m-actions { display: flex; gap: 10px; justify-content: center; }
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 120; }
.toast { background: #10231b; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; min-width: 260px; animation: slideUp .25s ease; font-size: 14.5px; }
.toast .ic { color: #5ee0a6; }
.toast.err .ic { color: #ff8a92; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.95); opacity: 0; } }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } }
.fade-in { animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }

.overlay { display: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-card .mobile-brand { display: flex; margin-bottom: 26px; color: var(--primary-700); }
  .login-card .mobile-brand .emblem { background: var(--primary-50); }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 35; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .form-layout, .grid-2b { grid-template-columns: 1fr; }
  .user-chip .u-text { display: none; }
}
@media (max-width: 640px) {
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .search-global { display: none; }
  .stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
  .toolbar .select { width: 100%; }
  .page-head h1 { font-size: 21px; }
  .profile-head { padding: 0 16px 18px; }
  .welcome .w-stat { min-width: 0; flex: 1; }
  .chart { gap: 6px; } .chart-labels { gap: 6px; }
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1200px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
@media print { .sidebar, .topbar, .footer, .page-actions, .tabs { display: none !important; } .main { margin: 0; } }
.profile-head { align-items: flex-start; }
.profile-head .info { padding-top: 70px; }
@media (max-width: 640px) { .profile-head .info { padding-top: 0; } }
/* গ্রিড কলাম যেন কনটেন্টের কারণে প্রসারিত না হয় */
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.main, .content, .card { min-width: 0; }
.main { overflow-x: clip; }
@media (max-width: 1200px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-2 { grid-template-columns: minmax(0, 1fr); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .stats { grid-template-columns: minmax(0, 1fr); } }

/* ================= v2: লাইভ ড্যাশবোর্ড, প্রতিবেদন, ছুটি, ডিভাইস ================= */
.ap { font-size: .72em; opacity: .65; font-weight: 500; }
.small-muted { font-size: 13px; color: var(--muted); }
.small-link { font-size: 13px; }
a.stat { color: inherit; transition: box-shadow .2s, transform .2s; }
a.stat:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stats-6 .stat { flex-direction: column; gap: 10px; }
.tone-gray .s-ic { background: #eef1f0; color: #6b7a74; } .tone-gray .bar i { background: #9aa8a2; }
.tone-teal .s-ic { background: #e0f6f8; color: #0e7f8c; } .tone-teal .bar i { background: #0e7f8c; }
@media (max-width: 1300px) { .stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pulse { width: 9px; height: 9px; border-radius: 50%; background: #3ee08f; display: inline-block; position: relative; flex-shrink: 0; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #3ee08f; animation: ping 1.6s infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.live-pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); padding: 3px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #3ee08f; box-shadow: 0 0 0 3px rgba(62,224,143,.25); }
.nav a.active .live-dot { background: var(--success); }
.badge-count.warn { background: #ffd76a !important; color: #5a3d00 !important; font-weight: 700; }

.feed em { font-style: normal; font-weight: 600; }
.t-in { color: var(--success); } .t-out { color: var(--info); } .t-late { color: var(--warning); font-weight: 600; }
.hbars { display: grid; gap: 7px; }
.hbar { display: grid; grid-template-columns: 52px 1fr 26px; align-items: center; gap: 10px; font-size: 13px; }
.hbar span { color: var(--muted); text-align: right; }
.hbar > div { height: 14px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 5px; transition: width .4s; }
.hbar b { text-align: right; }
.dept-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; gap: 10px; }
.dept-row b { white-space: nowrap; }
.progress { height: 9px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--primary), #2fbf86); border-radius: 99px; }
.grid-2b { margin-bottom: 0; }

/* ফিল্টার */
.filter-card { padding: 16px 20px 4px; margin-bottom: 18px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; }
.filter-grid .field label { font-size: 13px; }
.date-nav { display: flex; gap: 6px; align-items: center; }
.date-nav .input, .date-nav .select { min-width: 0; padding: 9px 10px; }
.date-nav .btn-icon { height: 42px; width: 38px; flex-shrink: 0; }
.field .search { position: relative; }
.field .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.field .search .input { padding-left: 40px; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.seg button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }

.notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--info-50); color: var(--info); margin-bottom: 16px; font-size: 14px; }
.notice.live { background: var(--primary-50); color: var(--primary-700); }
.notice .pulse { background: var(--success); } .notice .pulse::after { border-color: var(--success); }
.sum-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.sum-chip { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; min-width: 110px; flex: 1; }
.sum-chip span { display: block; font-size: 12.5px; color: var(--muted); }
.sum-chip b { font-size: 22px; line-height: 1.2; }
.sum-chip.present b { color: var(--success); } .sum-chip.late b { color: var(--warning); } .sum-chip.leave b { color: var(--info); } .sum-chip.absent b { color: var(--danger); } .sum-chip.neutral b { color: #6b7a74; }
.sum-chip.present { border-left: 4px solid var(--success); } .sum-chip.late { border-left: 4px solid var(--warning); } .sum-chip.leave { border-left: 4px solid var(--info); } .sum-chip.absent { border-left: 4px solid var(--danger); } .sum-chip.neutral { border-left: 4px solid #9aa8a2; }
.tbl tr.row-absent { background: #fffafa; }
.tbl tr.row-off td { background: #fafbfb; color: #a3afa9; }
.tbl tr.row-off .badge { opacity: .8; }
.badge.holiday { background: #f1eafd; color: #7c3aed; }

/* মাসিক */
.month-info { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.mi { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.mi span { display: block; font-size: 12.5px; color: var(--muted); }
.mi b { font-size: 22px; display: block; line-height: 1.3; }
.mi small { font-size: 12px; color: var(--text-2); display: block; }
@media (max-width: 1300px) { .month-info { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .month-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.report-tbl th.c, .report-tbl td.c { text-align: center; }
.report-tbl .person { min-width: 210px; }
.num { display: inline-block; min-width: 30px; padding: 2px 8px; border-radius: 7px; font-weight: 700; }
.num.present { background: var(--success-50); color: var(--success); } .num.late { background: var(--warning-50); color: var(--warning); }
.num.leave { background: var(--info-50); color: var(--info); } .num.absent { background: var(--danger-50); color: var(--danger); }
.rate { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.rate > div { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.rate i { display: block; height: 100%; border-radius: 99px; }
.rate.good i { background: var(--success); } .rate.mid i { background: var(--warning); } .rate.bad i { background: var(--danger); }
.rate.good b { color: var(--success); } .rate.mid b { color: var(--warning); } .rate.bad b { color: var(--danger); }
.tbl tfoot td { background: var(--primary-50); padding: 12px 16px; border-top: 2px solid var(--primary-100); }

.matrix-wrap { max-height: 70vh; }
table.matrix { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.matrix th, .matrix td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; padding: 0; }
.matrix thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 2; padding: 6px 2px; font-weight: 600; min-width: 30px; }
.matrix thead th small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }
.matrix thead th.off { background: #eef1f0; color: #a3afa9; }
.matrix .sticky { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; padding: 6px 12px; min-width: 210px; max-width: 230px; }
.matrix thead .sticky { z-index: 3; background: var(--surface-2); }
.matrix .sticky b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matrix .sticky small { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.matrix tbody tr:hover td { filter: brightness(.97); }
.mc { height: 38px; font-weight: 700; cursor: default; }
.mc.present { background: #e9f8f0; color: var(--success); } .mc.late { background: #fff3dc; color: #b86f00; }
.mc.leave { background: #e7eefc; color: var(--info); } .mc.absent { background: #fde8ea; color: var(--danger); }
.mc.holiday { background: #f1eafd; color: #7c3aed; }
.mc.weekend { background: repeating-linear-gradient(45deg, #f4f6f5, #f4f6f5 3px, #e9edec 3px, #e9edec 6px); }
.mc.pending { background: #f4f6f5; color: var(--muted); } .mc.future, .mc.na { background: #fcfdfd; }
.matrix .tot { font-weight: 700; padding: 0 8px; background: var(--surface-2); }
.matrix-legend { padding: 12px 20px; }
.matrix-legend b.mc { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; font-size: 12px; }

/* একক প্রতিবেদন */
.report-person { display: flex; align-items: center; gap: 20px; padding: 20px 24px; margin-bottom: 18px; flex-wrap: wrap; background: linear-gradient(120deg, #fff 60%, var(--primary-50)); }
.avatar.xl { width: 92px; height: 92px; font-size: 32px; box-shadow: 0 0 0 4px var(--primary-50); }
.rp-info { flex: 1; min-width: 240px; }
.rp-info h2 { margin: 0; font-size: 22px; }
.rp-info .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rp-rate { text-align: center; font-size: 13px; color: var(--muted); }
.ring { --c: var(--success); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 4px; background: radial-gradient(#fff 58%, transparent 59%), conic-gradient(var(--c) calc(var(--p) * 1%), #e8edeb 0); }
.ring b { font-size: 20px; color: var(--text); }
.rp-rate.mid .ring { --c: var(--warning); } .rp-rate.bad .ring { --c: var(--danger); }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; border-top: 4px solid var(--primary-100); }
.tile span { font-size: 12.5px; color: var(--muted); display: block; }
.tile b { font-size: 26px; display: block; line-height: 1.3; } .tile b.sm { font-size: 18px; padding: 4px 0; }
.tile small { font-size: 12px; color: var(--text-2); }
.tile.present { border-top-color: var(--success); } .tile.present b { color: var(--success); }
.tile.late { border-top-color: var(--warning); } .tile.late b { color: var(--warning); }
.tile.leave { border-top-color: var(--info); } .tile.leave b { color: var(--info); }
.tile.absent { border-top-color: var(--danger); } .tile.absent b { color: var(--danger); }
@media (max-width: 1300px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cal .day.holiday { background: #f1eafd; color: #7c3aed; }
.cal .day.pending { background: #eef1f0; color: var(--muted); }
.cal .day.na { background: #fcfdfd; color: #d0d7d4; }
.today-box { margin-left: auto; padding-top: 70px; text-align: right; font-size: 13px; display: grid; gap: 4px; justify-items: end; }
.today-box small { color: var(--muted); }
@media (max-width: 760px) { .today-box { padding-top: 0; margin-left: 0; justify-items: start; text-align: left; } }

/* ছুটি */
.hidden { display: none !important; }
.leave-form { margin-bottom: 18px; border: 1.5px solid var(--primary-100); }
.lv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.btn-approve { background: var(--success-50); color: var(--success); }
.btn-approve:hover { background: var(--success); color: #fff; }
.hol-date { width: 46px; height: 46px; border-radius: 10px; background: #f1eafd; color: #7c3aed; display: grid; place-items: center; text-align: center; line-height: 1; flex-shrink: 0; }
.hol-date b { font-size: 17px; } .hol-date span { font-size: 11px; }
.bal { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.bal > div { flex: 1; height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bal i { display: block; height: 100%; background: var(--info); border-radius: 99px; }
.bal span { font-size: 13px; white-space: nowrap; color: var(--muted); }
.bal span b { color: var(--text); }

/* ডিভাইস */
.device-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .device-grid { grid-template-columns: minmax(0, 1fr); } }
.device { padding: 18px 20px; position: relative; overflow: hidden; }
.device::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--primary), #2fbf86); }
.device.off::before { background: linear-gradient(90deg, var(--danger), #ff8a92); }
.dv-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.dv-ic { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(140deg, #0b7a59, #04392a); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(10,107,78,.25); }
.dv-ic .ic { width: 26px; height: 26px; }
.device.off .dv-ic { background: linear-gradient(140deg, #9aa8a2, #6b7a74); box-shadow: none; }
.dv-title { flex: 1; min-width: 0; } .dv-title b { display: block; font-size: 17px; } .dv-title span { font-size: 13px; color: var(--muted); }
.dv-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.dv-status i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dv-status.on { background: var(--success-50); color: var(--success); } .dv-status.on i { animation: blink 1.6s infinite; }
.dv-status.off { background: var(--danger-50); color: var(--danger); }
@keyframes blink { 50% { opacity: .3; } }
.dv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; margin-bottom: 14px; }
.dv-meta small { display: block; font-size: 12px; color: var(--muted); } .dv-meta span { font-size: 13.5px; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px !important; }
.dv-nums { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-bottom: 12px; }
.dv-nums div + div { border-left: 1px solid var(--border); }
.dv-nums b { font-size: 22px; display: block; line-height: 1.2; } .dv-nums small { font-size: 12px; color: var(--muted); }
.dv-cap { margin-bottom: 14px; } .dv-cap small { color: var(--muted); font-size: 12px; }
.dv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; }
.dv-foot .small-muted { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.device.off .dv-foot .small-muted { color: var(--danger); }
.spin { width: 13px; height: 13px; border: 2px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; display: inline-block; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* প্রিন্ট */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 12px; }
  .print-only { display: block; }
  .print-head { text-align: center; border-bottom: 2px solid #000; padding-bottom: 8px; margin-bottom: 14px; }
  .print-head b { font-size: 18px; } .print-head .ph-sub { font-size: 15px; font-weight: 700; margin-top: 4px; }
  .no-print, .filter-card, .breadcrumb, .toasts { display: none !important; }
  .content { padding: 0; } .card { box-shadow: none; break-inside: avoid; }
  .avatar img { display: none; }
  .table-wrap, .matrix-wrap { overflow: visible; max-height: none; }
  .matrix .sticky { position: static; }
}
.filter-grid .span2 { grid-column: span 2; }
@media (max-width: 640px) { .filter-grid .span2 { grid-column: auto; } }
.report-tbl td:nth-child(3) { min-width: 170px; }

/* ================= সেটিংস ================= */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-grid .st-wide { grid-column: 1 / -1; }
@media (max-width: 960px) { .settings-grid { grid-template-columns: minmax(0, 1fr); } }
.st-times { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1200px) { .st-times { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .st-times { grid-template-columns: minmax(0, 1fr); } }
.hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.timeline-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px 16px; margin-top: 6px; }
.tl-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 34px; }
.tl-bar { position: relative; height: 16px; border-radius: 99px; background: #e3e9e6; margin: 0 10px 44px; }
.tl-bar > i { position: absolute; top: 0; bottom: 0; }
.tl-bar .seg-ok { background: var(--success); border-radius: 99px 0 0 99px; }
.tl-bar .seg-late { background: var(--warning); }
.tl-bar .seg-abs { background: var(--danger); opacity: .85; }
.tl-bar .seg-off { background: #c5cfca; border-radius: 0 99px 99px 0; }
.tl-mark { position: absolute; top: -30px; transform: translateX(-50%); text-align: center; white-space: nowrap; line-height: 1.15; }
.tl-mark::after { content: ""; position: absolute; left: 50%; top: 28px; width: 2px; height: 22px; background: var(--text); transform: translateX(-50%); }
.tl-mark.down { top: 22px; } .tl-mark.down::after { top: -8px; height: 10px; }
.tl-mark.down b { margin-top: 4px; }
.tl-mark b { display: block; font-size: 13px; } .tl-mark small { font-size: 11px; color: var(--muted); }
.tl-legend { margin-top: 8px; }
.tl-examples { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.tl-examples span { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.day-chip input { display: none; }
.day-chip span { display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1.5px solid var(--border); cursor: pointer; font-weight: 600; color: var(--text-2); user-select: none; transition: all .15s; }
.day-chip input:checked + span { background: var(--danger-50); border-color: #f3b4b9; color: var(--danger); }
.quota-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quota-row label { margin: 0; }
.num-input { display: flex; align-items: center; gap: 8px; } .num-input .input { width: 90px; text-align: center; } .num-input span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.hol-add { display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 640px) { .hol-add { grid-template-columns: 1fr; } }
.sys-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.sys-row b { display: block; font-size: 14px; } .sys-row span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .sys-row { grid-template-columns: 1fr; } }
.sticky-save { position: sticky; bottom: 0; margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: rgba(255,255,255,.92); backdrop-filter: blur(8px); justify-content: space-between; align-items: center; z-index: 5; }
#dirty { color: var(--warning); font-weight: 600; }
.mc { min-width: 30px; }

/* ================= কেন্দ্রীয় ড্যাশবোর্ড ================= */
.central-hero { background: radial-gradient(circle at 70% 10%, rgba(226,53,63,.4) 0, rgba(226,53,63,0) 30%), radial-gradient(circle at 10% 100%, rgba(201,162,39,.25) 0, rgba(201,162,39,0) 35%), linear-gradient(120deg, #0b7a59, #04392a); }
.hero-rate { text-align: center; font-size: 13px; opacity: .95; }
.hero-rate .ring { --c: #3ee08f; background: radial-gradient(#075a41 60%, transparent 61%), conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.15) 0); }
.ring.big { width: 104px; height: 104px; } .hero-rate .ring b { color: #fff; font-size: 22px; }
.div-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1400px) { .div-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .div-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.div-card { text-align: left; padding: 14px; cursor: pointer; border-top: 4px solid var(--dc); transition: transform .15s, box-shadow .15s; font: inherit; }
.div-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.div-card.on { box-shadow: 0 0 0 2px var(--dc), var(--shadow); }
.dc-top { display: flex; justify-content: space-between; align-items: baseline; } .dc-top b { font-size: 16px; color: var(--dc); } .dc-top span { font-size: 12px; color: var(--muted); }
.dc-rate b { font-size: 26px; line-height: 1.3; display: block; } .dc-rate small { font-size: 12px; color: var(--muted); }
.dc-bar { display: flex; height: 7px; border-radius: 99px; overflow: hidden; background: var(--surface-2); margin: 8px 0; }
.dc-bar i { display: block; height: 100%; }
.dc-mini { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; gap: 4px; flex-wrap: wrap; }
.heatmap { display: grid; gap: 12px; }
.hm-div { display: grid; grid-template-columns: 82px 1fr; gap: 10px; align-items: start; }
.hm-label { font-weight: 700; font-size: 14px; padding-top: 10px; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.hm-tile { border-radius: 9px; padding: 7px 9px; position: relative; transition: transform .12s, box-shadow .12s; min-height: 50px; }
.hm-tile:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,.18); z-index: 2; }
.hm-tile b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile span { font-size: 12.5px; font-weight: 600; opacity: .9; }
.hm-tile em { position: absolute; top: 4px; right: 5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: var(--danger); font-style: normal; font-weight: 800; font-size: 11px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--danger); }
.hm-tile.off { outline: 2px dashed var(--danger); outline-offset: 1px; }
@media (max-width: 640px) { .hm-div { grid-template-columns: 1fr; } .hm-label { padding: 0; } }
.heat-legend { font-size: 12px; gap: 10px; }
.heat-legend .grad { width: 90px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, rgba(10,107,78,.12), rgba(10,107,78,.9)); }
.rank-no { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; background: var(--success-50); color: var(--success); }
.rank-no.bottom { background: var(--danger-50); color: var(--danger); } .rank-no.late { background: var(--warning-50); color: var(--warning); }
.col-val { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin-top: 4px; position: absolute; top: -20px; }
.chart .col { position: relative; }
.alert-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--warning-50); color: var(--warning); flex-shrink: 0; }
.alert-ic.off { background: var(--danger-50); color: var(--danger); } .alert-ic.late { background: var(--warning-50); color: var(--warning); }
.office-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.oc-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.oc-ic .ic { width: 16px; height: 16px; }
.office-cell b { display: block; font-size: 14px; } .office-cell span { font-size: 12px; color: var(--muted); }
.click-row { cursor: pointer; }
.district-head { display: flex; align-items: center; gap: 20px; padding: 20px 24px; margin-bottom: 18px; flex-wrap: wrap; border-left: 5px solid var(--dc); }
.dh-ic { width: 76px; height: 76px; border-radius: 18px; background: var(--dc); color: #fff; display: grid; place-items: center; }
.dh-ic .ic { width: 36px; height: 36px; }
.stackbar { display: flex; height: 14px; border-radius: 5px; overflow: hidden; background: var(--surface-2); }
.stackbar i { display: block; height: 100%; }
@media (max-width: 1100px) { .tiles[style] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
td.mono { white-space: nowrap; }
/* সরকারি লোগো */
.emblem { background: #fff !important; overflow: hidden; }
.emblem img { width: 90%; height: 90%; object-fit: contain; display: block; }
.login-card .mobile-brand .emblem { box-shadow: 0 0 0 3px var(--primary-50); }
