:root{
  --bg:#f3f7ff;--card:#fff;--text:#172033;--muted:#64748b;--primary:#2563eb;
  --dark:#0f172a;--border:#e2e8f0;--danger:#dc2626;--success:#16a34a;--warn:#f59e0b;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
.hidden{display:none!important}
button,input,select,textarea{font:inherit}
button{border:0;cursor:pointer;font-weight:700}
input,select,textarea{width:100%;border:1px solid var(--border);border-radius:13px;padding:11px 13px;outline:none;background:#fff}
input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
textarea{min-height:90px;resize:vertical}
label{display:block;font-weight:800;margin:12px 0 6px;color:#334155}
small.help{display:block;color:var(--muted);margin-top:4px}
.login-screen{min-height:100vh;display:grid;grid-template-columns:1.15fr .85fr;background:linear-gradient(135deg,#0f172a 0%,#1e3a8a 52%,#eff6ff 52%,#f8fafc 100%)}
.notice-panel{display:grid;place-items:center;color:white;padding:42px}
.notice-content{max-width:740px}
.brand-pill{display:inline-flex;padding:10px 16px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.25);font-weight:900}
.notice-content h1{font-size:clamp(34px,5vw,64px);line-height:1.03;margin:24px 0 14px}
.notice-content p{font-size:18px;color:#dbeafe}
.notice-grid{display:grid;gap:14px;margin-top:30px}
.notice-card{padding:18px;border-radius:22px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.18)}
.notice-card span{display:block;color:#dbeafe;margin-top:7px}
.login-panel{display:grid;place-items:center;padding:28px}
.login-card{width:430px;max-width:100%;background:#fff;padding:28px;border-radius:30px;box-shadow:0 30px 90px rgba(15,23,42,.22)}
.logo-row,.side-brand,.user-card{display:flex;align-items:center;gap:13px}
.logo{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;background:linear-gradient(135deg,#2563eb,#0f172a);color:#fff;font-weight:900}
.logo.mini{width:44px;height:44px;border-radius:16px}
.logo-row h2{margin:0}.logo-row p{margin:5px 0 0;color:var(--muted)}
.password-box{display:flex;gap:8px}.password-box input{flex:1}.password-box button{width:54px;border-radius:13px;background:#eff6ff}
.primary,.secondary,.success,.danger,.gray{padding:11px 15px;border-radius:13px;color:white}
.primary{background:var(--primary)}.secondary{background:#475569}.success{background:var(--success)}.danger{background:var(--danger)}.gray{background:#64748b}
.full{width:100%;margin-top:18px}
.login-note{font-size:14px;color:var(--muted);text-align:center;margin:16px 0 0}
.app-screen{min-height:100vh;display:grid;grid-template-columns:290px 1fr}
.sidebar{background:#0f172a;color:#fff;padding:20px;display:flex;flex-direction:column;gap:14px}
.side-brand{padding-bottom:16px;border-bottom:1px solid rgba(255,255,255,.12)}.side-brand span{display:block;color:#93c5fd;font-size:13px;margin-top:4px}
.user-card{background:rgba(255,255,255,.08);padding:14px;border-radius:22px}.user-card span{display:block;color:#cbd5e1;font-size:13px;margin-top:4px}
.avatar{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:#2563eb;font-weight:900}
.side-btn,.logout-btn{text-align:left;padding:13px 14px;border-radius:16px;background:transparent;color:#dbeafe}
.side-btn:hover,.side-btn.active{background:rgba(255,255,255,.1);color:#fff}
.logout-btn{margin-top:auto;background:rgba(220,38,38,.16);color:#fecaca}
.main{padding:26px;overflow-x:hidden}.topbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:28px}
.topbar h1{margin:0}.topbar p{margin:7px 0 0;color:var(--muted)}
.db-status{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--border);border-radius:999px;padding:10px 14px;white-space:nowrap}
#dbDot{width:11px;height:11px;border-radius:50%;background:var(--warn)}#dbDot.ok{background:var(--success)}#dbDot.fail{background:var(--danger)}
.circle-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(158px,1fr));gap:26px}
.circle-btn{width:158px;height:158px;margin:auto;border-radius:50%;background:white;border:1px solid var(--border);box-shadow:0 18px 45px rgba(15,23,42,.08);display:grid;place-items:center;text-align:center;padding:15px;transition:.2s;position:relative;overflow:hidden}
.circle-btn:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at top,rgba(37,99,235,.18),transparent 55%)}
.circle-btn:hover{transform:translateY(-7px) scale(1.03);border-color:rgba(37,99,235,.4);box-shadow:0 24px 70px rgba(37,99,235,.18)}
.circle-btn .icon{font-size:35px;position:relative}.circle-btn b{display:block;margin-top:8px;position:relative}.circle-btn small{display:block;color:var(--muted);margin-top:4px;position:relative}
.card{background:#fff;border:1px solid var(--border);border-radius:24px;padding:20px;box-shadow:0 18px 45px rgba(15,23,42,.05);margin-bottom:18px}
.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 16px}.full-row{grid-column:1/-1}
.toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 16px}.toolbar input,.toolbar select{width:auto}.toolbar .grow{flex:1;min-width:220px}
.tabs{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.tab{padding:10px 14px;border-radius:999px;background:#e2e8f0;color:#334155}.tab.active{background:#2563eb;color:#fff}
.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:18px}table{width:100%;border-collapse:collapse;background:#fff;min-width:900px}
th,td{padding:13px 14px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}th{background:#f8fafc;color:#334155;font-size:13px;text-transform:uppercase}tr:last-child td{border-bottom:0}
.action{padding:8px 10px;border-radius:10px;background:#eff6ff;color:#1d4ed8;margin:2px}.action.danger-text{background:#fee2e2;color:#991b1b}
.badge{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}.badge.ok{background:#dcfce7;color:#166534}.badge.warn{background:#fef3c7;color:#92400e}.badge.bad{background:#fee2e2;color:#991b1b}.badge.info{background:#dbeafe;color:#1e40af}
.empty{padding:24px;text-align:center;color:var(--muted)}
.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);display:grid;place-items:center;z-index:80;padding:18px}
.modal{background:#fff;border-radius:24px;padding:22px;width:min(880px,100%);max-height:90vh;overflow:auto;box-shadow:0 30px 90px rgba(0,0,0,.25)}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
pre.json{white-space:pre-wrap;max-height:300px;overflow:auto;background:#f8fafc;border:1px solid var(--border);border-radius:14px;padding:12px}
#toast{position:fixed;right:18px;top:18px;z-index:100;display:grid;gap:9px}.toast{background:#0f172a;color:white;padding:13px 15px;border-radius:16px;box-shadow:0 20px 50px rgba(15,23,42,.25)}
@media(max-width:1000px){.login-screen,.app-screen{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.topbar{flex-direction:column}}


/* ===== V5 ORBIT HOME LAYOUT ===== */
.circle-grid.orbit-home {
  position: relative;
  width: min(1100px, 100%);
  height: 660px;
  margin: 10px auto 0;
  display: block;
}

.orbit-center {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 190px;
  height: 145px;
  border-radius: 50%;
  border: 5px solid #3f9b2f;
  background: #ffffff;
  color: #111827;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 29px;
  line-height: 1.2;
  font-weight: 500;
  box-shadow: 0 15px 40px rgba(63,155,47,.10);
  z-index: 3;
}

.orbit-btn {
  position: absolute;
  width: 205px;
  height: 135px;
  border-radius: 50%;
  border: 5px solid #3f9b2f;
  background: #ffffff;
  color: #111827;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  box-shadow: 0 16px 42px rgba(15,23,42,.06);
  transition: .2s ease;
  overflow: hidden;
}

.orbit-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(63,155,47,.12), transparent 58%);
  opacity: 0;
  transition: .2s ease;
}

.orbit-btn:hover {
  transform: translateY(-7px) scale(1.035);
  box-shadow: 0 24px 60px rgba(63,155,47,.22);
  background: #f8fff7;
}

.orbit-btn:hover::before {
  opacity: 1;
}

.orbit-btn .icon {
  font-size: 30px;
  position: relative;
  margin-bottom: 5px;
}

.orbit-btn b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  position: relative;
}

.orbit-btn small {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 4px;
  position: relative;
}

.orbit-pos-0 { left: 14%; top: 1%; }
.orbit-pos-1 { left: 39%; top: 7%; }
.orbit-pos-2 { left: 2%; top: 29%; }
.orbit-pos-3 { right: 13%; top: 28%; }
.orbit-pos-4 { left: 26%; bottom: 8%; }
.orbit-pos-5 { right: 27%; bottom: 7%; }
.orbit-pos-6 { right: 3%; top: 2%; }
.orbit-pos-7 { left: 0%; bottom: 4%; }
.orbit-pos-8 { right: 1%; bottom: 3%; }
.orbit-pos-9 { left: 24%; top: 27%; transform: translateX(-50%); }
.orbit-pos-10 { right: 24%; top: 50%; }

.orbit-pos-9:hover,
.orbit-pos-10:hover {
  transform: translateX(-50%) translateY(-7px) scale(1.035);
}

@media (max-width: 1000px) {
  .circle-grid.orbit-home {
    height: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
  }

  .orbit-center,
  .orbit-btn,
  .orbit-pos-0,
  .orbit-pos-1,
  .orbit-pos-2,
  .orbit-pos-3,
  .orbit-pos-4,
  .orbit-pos-5,
  .orbit-pos-6,
  .orbit-pos-7,
  .orbit-pos-8,
  .orbit-pos-9,
  .orbit-pos-10 {
    position: static;
    transform: none;
    width: 100%;
    height: 128px;
  }

  .orbit-center {
    grid-column: 1 / -1;
    width: 190px;
    justify-self: center;
  }

  .orbit-pos-9:hover,
  .orbit-pos-10:hover {
    transform: translateY(-7px) scale(1.035);
  }
}


/* ===== V6 FLOWER HOME - Trang chủ là nhụy, phân hệ là cánh hoa xoay đều ===== */
.main.flower-mode {
  padding-top: 18px;
}

.main.flower-mode .topbar {
  display: none;
}

.circle-grid.flower-home {
  position: relative;
  width: min(1180px, 94vw);
  height: min(760px, calc(100vh - 70px));
  min-height: 650px;
  margin: 0 auto;
  display: block;
}

.flower-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 185px;
  height: 145px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 5px solid #3f9b2f;
  background: #fff;
  color: #111827;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 30px;
  line-height: 1.18;
  font-weight: 500;
  box-shadow: 0 20px 60px rgba(63,155,47,.16);
  z-index: 4;
}

.flower-petal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 230px;
  height: 142px;
  border-radius: 50%;
  border: 5px solid #3f9b2f;
  background: #fff;
  color: #111827;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(15,23,42,.07);
  transition: .2s ease;
  overflow: hidden;
  z-index: 2;
}

.flower-petal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(63,155,47,.13), transparent 62%);
  opacity: 0;
  transition: .2s ease;
}

.flower-petal:hover {
  box-shadow: 0 28px 74px rgba(63,155,47,.24);
  background: #f8fff7;
}

.flower-petal:hover::before {
  opacity: 1;
}

.flower-petal .icon {
  font-size: 30px;
  position: relative;
  margin-bottom: 5px;
}

.flower-petal b {
  display: block;
  font-size: 15px;
  line-height: 1.2;
  position: relative;
}

.flower-petal small {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 5px;
  position: relative;
}

.flower-petal > div {
  transform: var(--content-rotate);
}

.flower-status {
  position: fixed;
  top: 16px;
  right: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: 0 12px 34px rgba(15,23,42,.08);
  font-weight: 800;
}

.flower-status span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--success);
}

.flower-status.fail span {
  background: var(--danger);
}

@media (max-width: 1050px) {
  .main.flower-mode .topbar {
    display: flex;
  }

  .flower-status {
    display: none;
  }

  .circle-grid.flower-home {
    height: auto;
    min-height: unset;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 18px;
    width: 100%;
  }

  .flower-center,
  .flower-petal {
    position: static;
    transform: none !important;
    width: 100%;
    height: 130px;
  }

  .flower-center {
    grid-column: 1 / -1;
    width: 190px;
    justify-self: center;
  }

  .flower-petal > div {
    transform: none;
  }
}


/* ===== V7 PRO UI ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

body, button, input, select, textarea {
  font-family: 'Inter', Arial, Helvetica, sans-serif;
}

.db-status,
.flower-status {
  display: none !important;
}

.flower-center {
  cursor: pointer;
  transition: .2s ease;
}

.flower-center:hover {
  transform: translate(-50%, -50%) scale(1.045);
  box-shadow: 0 26px 78px rgba(63,155,47,.25);
  background: #f8fff7;
}

.home-dashboard {
  display: grid;
  gap: 18px;
}

.home-hero {
  min-height: 230px;
  border-radius: 32px;
  padding: 30px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,.24), transparent 32%),
    linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #2563eb 100%);
  box-shadow: 0 26px 70px rgba(30,58,138,.22);
  position: relative;
  overflow: hidden;
}

.home-hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  right: -130px;
  top: -120px;
  background: rgba(255,255,255,.12);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
}

.home-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.pro-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(15,23,42,.06);
}

.pro-stat span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.pro-stat b {
  display: block;
  margin-top: 9px;
  font-size: 30px;
  letter-spacing: -0.03em;
}

.home-panels {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.notice-feed {
  display: grid;
  gap: 12px;
}

.notice-feed-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15,23,42,.04);
}

.notice-feed-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 22px;
  flex: 0 0 auto;
}

.notice-feed-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.notice-feed-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.notice-feed-item small {
  display: block;
  color: #94a3b8;
  margin-top: 7px;
}

.quick-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 20px;
  box-shadow: 0 18px 45px rgba(15,23,42,.06);
}

.quick-panel h2,
.card h2 {
  letter-spacing: -0.02em;
}

.reminder-list {
  display: grid;
  gap: 12px;
}

.reminder-item {
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.reminder-item b {
  display: block;
  margin-bottom: 4px;
}

.reminder-item span {
  color: var(--muted);
  font-size: 14px;
}

.invoice-preview {
  padding: 16px;
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  border-radius: 18px;
  color: #1e3a8a;
}

@media (max-width: 1100px) {
  .home-stats,
  .home-panels {
    grid-template-columns: 1fr;
  }
}


/* V8 invoice service section */
.card h3 {
  letter-spacing: -0.02em;
  color: #172033;
}


/* ===== V9 ULTIMATE PRO DESIGN ===== */
:root {
  --pro-bg: #eef4ff;
  --pro-card: rgba(255,255,255,.92);
  --pro-line: #dbe7ff;
  --pro-blue: #2563eb;
  --pro-navy: #0f172a;
  --pro-green: #22c55e;
  --pro-shadow: 0 22px 70px rgba(15,23,42,.10);
}

body {
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.11), transparent 32%),
    linear-gradient(180deg, #f7fbff, #edf4ff);
}

.sidebar {
  background:
    radial-gradient(circle at top, rgba(37,99,235,.36), transparent 28%),
    linear-gradient(180deg, #0f172a, #111827 70%, #020617);
  box-shadow: 16px 0 50px rgba(2,6,23,.16);
}

.main {
  background:
    radial-gradient(circle at 80% 0%, rgba(37,99,235,.10), transparent 28%),
    transparent;
}

.card,
.quick-panel,
.pro-stat,
.login-card,
.modal {
  border: 1px solid rgba(219,231,255,.9);
  box-shadow: var(--pro-shadow);
}

.card {
  backdrop-filter: blur(14px);
}

.topbar h1,
.home-hero h1,
.card h2 {
  font-weight: 900;
  letter-spacing: -0.045em;
}

.pro-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pro-toolbar-left,
.pro-toolbar-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pro-search {
  min-width: 260px;
  width: 320px;
  background: #fff;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

.icon-btn:hover {
  background: #dbeafe;
}

.action.view {
  background: #ecfeff;
  color: #0e7490;
}

.action.pay {
  background: #dcfce7;
  color: #166534;
}

.action.print {
  background: #fef3c7;
  color: #92400e;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

.detail-item {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.detail-item span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.detail-item b {
  font-size: 14px;
  word-break: break-word;
}

.invoice-paper {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 24px;
}

.invoice-paper h2 {
  text-align: center;
  margin-top: 0;
}

.invoice-total {
  font-size: 28px;
  font-weight: 900;
  text-align: right;
  color: #1d4ed8;
}

.qr-box {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 2px dashed #93c5fd;
  background: linear-gradient(135deg,#eff6ff,#fff);
  font-size: 42px;
  margin: 12px auto;
}

.room-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.room-mini-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.finance-income {
  color: #166534;
  font-weight: 900;
}

.finance-expense {
  color: #991b1b;
  font-weight: 900;
}

@media print {
  body * {
    visibility: hidden;
  }
  .print-area, .print-area * {
    visibility: visible;
  }
  .print-area {
    position: absolute;
    inset: 0;
    padding: 20px;
  }
}

@media(max-width: 900px) {
  .detail-grid,
  .room-detail-layout {
    grid-template-columns: 1fr;
  }
}


/* ===== V10 DASHBOARD + BOTTOM TABS - bỏ giao diện bông hoa ===== */
.sidebar {
  display: none !important;
}

.app-screen {
  grid-template-columns: 1fr !important;
  padding-bottom: 96px;
}

.main {
  min-height: 100vh;
  padding: 24px 28px 110px;
}

.topbar {
  display: flex !important;
}

.main.flower-mode .topbar {
  display: flex !important;
}

#circleHome {
  display: none !important;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.dashboard-header {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 18px;
}

.dashboard-hero-pro {
  min-height: 270px;
  border-radius: 34px;
  padding: 32px;
  color: white;
  background:
    radial-gradient(circle at 82% 15%, rgba(255,255,255,.26), transparent 28%),
    radial-gradient(circle at 20% 100%, rgba(34,197,94,.20), transparent 35%),
    linear-gradient(135deg, #0f172a, #1e3a8a 55%, #2563eb);
  box-shadow: 0 30px 90px rgba(30,58,138,.24);
  position: relative;
  overflow: hidden;
}

.dashboard-hero-pro::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 54px solid rgba(255,255,255,.08);
}

.dashboard-hero-pro h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.dashboard-hero-pro p {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 16px 0 0;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.65;
}

.dashboard-user-panel {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(219,231,255,.9);
  border-radius: 34px;
  padding: 24px;
  box-shadow: 0 30px 90px rgba(15,23,42,.10);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-user-profile {
  display: flex;
  gap: 14px;
  align-items: center;
}

.dashboard-user-profile .avatar-big {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg,#2563eb,#0f172a);
  color: white;
  font-weight: 900;
  font-size: 26px;
}

.dashboard-user-profile h2 {
  margin: 0;
  letter-spacing: -0.035em;
}

.dashboard-user-profile p {
  margin: 5px 0 0;
  color: #64748b;
  font-weight: 700;
}

.dashboard-clock {
  padding: 15px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.dashboard-clock b {
  display: block;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.dashboard-clock span {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.dashboard-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}

.dashboard-metric {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(219,231,255,.95);
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 18px 50px rgba(15,23,42,.07);
  position: relative;
  overflow: hidden;
}

.dashboard-metric::after {
  content: "";
  position: absolute;
  right: -35px;
  top: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(37,99,235,.08);
}

.dashboard-metric .metric-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eff6ff;
  font-size: 23px;
}

.dashboard-metric span {
  display: block;
  margin-top: 13px;
  color: #64748b;
  font-weight: 800;
  font-size: 13px;
}

.dashboard-metric b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.dashboard-main-panels {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.dashboard-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(219,231,255,.95);
  border-radius: 30px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(15,23,42,.07);
}

.dashboard-card h2 {
  margin: 0 0 12px;
  letter-spacing: -0.04em;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.dashboard-action-btn {
  padding: 16px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  text-align: left;
  transition: .18s ease;
}

.dashboard-action-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-2px);
}

.dashboard-action-btn b {
  display: block;
  margin-bottom: 5px;
}

.dashboard-action-btn span {
  color: #64748b;
  font-size: 13px;
}

.bottom-tabs {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border-radius: 26px;
  background: rgba(15,23,42,.92);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 80px rgba(2,6,23,.34);
}

.bottom-tab {
  flex: 0 0 auto;
  min-width: 118px;
  padding: 11px 13px;
  border-radius: 18px;
  background: transparent;
  color: #cbd5e1;
  display: grid;
  gap: 4px;
  text-align: center;
  font-size: 12px;
}

.bottom-tab .tab-icon {
  font-size: 20px;
  line-height: 1;
}

.bottom-tab.active,
.bottom-tab:hover {
  background: #2563eb;
  color: white;
}

.bottom-tab span:last-child {
  font-weight: 800;
  white-space: nowrap;
}

.module-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.module-title-row h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.055em;
}

.module-title-row p {
  margin: 6px 0 0;
  color: #64748b;
}

.back-dashboard {
  padding: 11px 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #dbeafe;
}

@media(max-width: 1150px) {
  .dashboard-header,
  .dashboard-main-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-grid-4 {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media(max-width: 680px) {
  .main {
    padding: 16px 14px 110px;
  }

  .dashboard-grid-4,
  .dashboard-actions {
    grid-template-columns: 1fr;
  }

  .bottom-tab {
    min-width: 96px;
  }
}


/* ===== V11 POS-STYLE SIDEBAR LAYOUT ===== */
.sidebar {
  display: flex !important;
  flex-direction: column;
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, #2c86ac 0%, #277da1 35%, #247494 100%) !important;
  color: white;
  padding: 0;
  box-shadow: 10px 0 38px rgba(15,23,42,.12);
  border-right: 1px solid rgba(255,255,255,.16);
}

.app-screen {
  grid-template-columns: 280px 1fr !important;
  min-height: 100vh;
  padding-bottom: 0 !important;
}

.main {
  padding: 0 !important;
  min-height: 100vh;
  background: #f3f6fb !important;
}

#circleHome {
  display: none !important;
}

.bottom-tabs {
  display: none !important;
}

.side-brand-pro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

.brand-logo-circle {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  font-weight: 900;
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.side-brand-pro b {
  display: block;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.side-brand-pro span {
  color: rgba(255,255,255,.82);
  font-size: 13px;
}

.user-card-pro {
  margin: 0 !important;
  border-radius: 0 !important;
  background: rgba(255,255,255,.04) !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,.14);
  padding: 18px 20px !important;
}

.user-card-pro .avatar {
  background: rgba(255,255,255,.18) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,.2);
}

.user-card-pro b {
  color: white;
}

.user-card-pro span {
  color: rgba(255,255,255,.76);
}

.side-menu {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.side-menu-item {
  width: calc(100% - 16px);
  margin: 0 8px 6px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  transition: .18s ease;
}

.side-menu-item:hover {
  background: rgba(255,255,255,.10);
}

.side-menu-item.active {
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.side-menu-item .menu-ico {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.side-menu-item .menu-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-menu-item .menu-text b {
  font-size: 15px;
  color: white;
}

.side-menu-item .menu-text span {
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.14);
}

.logout-btn {
  width: 100%;
  border-radius: 14px !important;
  background: rgba(255,255,255,.12) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,.12) !important;
}

.topbar-pro {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 15;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-menu-dot {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #7b7b7b;
  color: white;
  font-size: 24px;
  line-height: 1;
}

.topbar-pro h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #374151;
}

.topbar-pro p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-pill {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d1d5db;
  color: #374151;
  min-width: 120px;
  text-align: center;
  font-weight: 600;
}

#moduleView {
  padding: 18px 22px 26px;
}

.module-title-row {
  margin-bottom: 18px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.module-title-row h1 {
  font-size: 28px !important;
}

.back-dashboard {
  background: #e8f3ff !important;
  color: #1565c0 !important;
  border: 1px solid #cfe7ff !important;
}

.dashboard-shell {
  display: grid;
  gap: 18px;
}

.dashboard-header {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
}

.dashboard-hero-pro {
  min-height: 86px !important;
  padding: 0 !important;
  border-radius: 16px !important;
  background: white !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
  border: 1px solid #e5e7eb !important;
  overflow: hidden;
}

.dashboard-hero-pro::after {
  display: none !important;
}

.dashboard-hero-pro h1 {
  color: #111827;
  font-size: 18px !important;
  padding: 16px 18px 0;
  margin: 0;
}

.dashboard-hero-pro p {
  color: #6b7280 !important;
  font-size: 13px !important;
  margin: 0;
  padding: 0 18px 14px;
}

.dashboard-user-panel {
  border-radius: 16px !important;
  padding: 18px !important;
  background: white !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
}

.dashboard-user-profile .avatar-big {
  background: #eaf3fb !important;
  color: #247494 !important;
}

.dashboard-grid-4 {
  grid-template-columns: repeat(4, minmax(0,1fr)) !important;
}

.dashboard-metric {
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
}

.dashboard-metric::after {
  background: rgba(44,134,172,.08) !important;
}

.dashboard-metric .metric-icon {
  background: #eaf3fb !important;
}

.dashboard-card {
  background: white !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
}

.notice-feed-item {
  border-radius: 16px !important;
  border: 1px solid #edf2f7 !important;
  box-shadow: none !important;
}

.dashboard-actions {
  grid-template-columns: repeat(2, minmax(0,1fr)) !important;
}

.dashboard-action-btn {
  border-radius: 16px !important;
}

.chart-placeholder {
  height: 320px;
  border-radius: 16px;
  background:
    linear-gradient(to top, rgba(59,130,246,.10) 0 1px, transparent 1px) 0 0/100% 54px,
    linear-gradient(to right, rgba(209,213,219,.55) 0 1px, transparent 1px) 0 0/64px 100%,
    #fff;
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.chart-line {
  position: absolute;
  left: 38px;
  right: 32px;
  bottom: 52px;
  height: 2px;
  background: #71a9e6;
}

.chart-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #71a9e6;
  bottom: 48px;
}

.pro-toolbar,
.card,
.quick-panel,
.pro-stat {
  box-shadow: 0 8px 24px rgba(15,23,42,.04) !important;
}

@media (max-width: 1180px) {
  .dashboard-grid-4 {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
  }
  .dashboard-header,
  .dashboard-main-panels {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .app-screen {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    width: 100% !important;
    min-width: 100% !important;
  }
}


/* ===== V12 PRO SIDEBAR ANALYTICS ===== */
.side-menu-section{padding:8px 8px 2px}
.side-group-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border:none;background:rgba(255,255,255,.06);border-radius:12px;color:#eaf6fb;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.side-group-toggle:hover{background:rgba(255,255,255,.11)}
.side-group-items{padding-top:6px}
.side-group-items.collapsed{display:none}
.side-group-arrow{font-size:16px;opacity:.85}
.topbar-right{position:relative}
.global-search-wrap{position:relative;min-width:320px}
.global-search{width:100%;padding:11px 14px;border-radius:12px;border:1px solid #d1d5db;background:#fff;outline:none}
.global-search:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.18)}
.global-search-result{position:absolute;top:calc(100% + 8px);left:0;right:0;background:#fff;border:1px solid #dbe2ea;border-radius:14px;box-shadow:0 18px 50px rgba(15,23,42,.12);padding:6px;z-index:30;max-height:280px;overflow:auto}
.global-search-item{width:100%;text-align:left;padding:10px 12px;border:none;background:#fff;border-radius:10px;display:flex;gap:10px;align-items:flex-start}
.global-search-item:hover{background:#eff6ff}
.global-search-item b{display:block;color:#111827}
.global-search-item span{font-size:12px;color:#6b7280}
.top-icon-btn{position:relative;width:44px;height:44px;border-radius:12px;border:1px solid #d1d5db;background:#fff;font-size:18px}
.notify-count{position:absolute;top:-6px;right:-6px;min-width:20px;height:20px;display:grid;place-items:center;border-radius:10px;background:#2563eb;color:#fff;font-size:11px;font-weight:800;padding:0 4px}
.dashboard-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.dashboard-filter{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.dashboard-filter label{font-size:12px;color:#6b7280;font-weight:700}
.dashboard-filter input,.dashboard-filter select{padding:10px 12px;border-radius:12px;border:1px solid #d1d5db;background:#fff}
.small-btn{padding:10px 13px;border:none;border-radius:12px;background:#e8f3ff;color:#1565c0;font-weight:700}
.small-btn:hover{filter:brightness(.98)}
.chart-panel{padding:12px;border:1px solid #e5e7eb;border-radius:16px;background:#fcfdff}
.chart-legend{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin:8px 0 0;color:#64748b;font-size:13px}
.chart-legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-2px}
.chart-svg-wrap{width:100%;overflow-x:auto}
.chart-svg{width:100%;height:280px;min-width:760px;display:block}
.dashboard-mini-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.activity-list,.status-list{display:grid;gap:10px}
.activity-item,.status-item{display:flex;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:14px;background:#f8fafc;border:1px solid #e5e7eb}
.activity-item b,.status-item b{color:#111827}
.activity-item span,.status-item span{color:#6b7280;font-size:13px}
.status-pill{padding:6px 10px;border-radius:999px;background:#e8f3ff;color:#1d4ed8;font-size:12px;font-weight:800}
.table-wrap table thead th{position:sticky;top:0;background:#f8fafc;z-index:1}
.card h2,.dashboard-card h2{letter-spacing:-.03em}
@media(max-width:1150px){.dashboard-mini-grid{grid-template-columns:1fr}.global-search-wrap{min-width:220px}}


/* ===== V13 FACILITY DATA SCOPE ===== */
select[multiple] {
  min-height: 130px;
  padding: 10px;
}

.scope-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #1565c0;
  font-size: 12px;
  font-weight: 800;
}


/* ===== V14 FONT TIMES NEW ROMAN ===== */
*,
*::before,
*::after {
  font-family: "Times New Roman", Times, serif !important;
}

body,
button,
input,
select,
textarea,
table,
th,
td,
label,
small,
span,
p,
b,
strong,
h1,
h2,
h3,
h4,
h5,
h6,
a,
div {
  font-family: "Times New Roman", Times, serif !important;
}


/* ===== V15 PRO FUNCTIONS / PHÍM CHỨC NĂNG ===== */
.quick-actions-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 2px;
  margin-bottom: 10px;
}

.quick-action {
  flex: 0 0 auto;
  min-width: 168px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid #dbe7ff;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 22px rgba(15,23,42,.05);
  text-align: left;
  transition: .18s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  background: #f8fbff;
}

.quick-action .qa-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8f3ff;
  font-size: 20px;
}

.quick-action b {
  display: block;
  font-size: 14px;
}

.quick-action span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-top: 2px;
}

.shortcut-hint {
  margin-left: auto;
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 7px;
  white-space: nowrap;
}

.kpi-status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}

.kpi-status-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.kpi-status-card small {
  color: #64748b;
  font-weight: 700;
}

.kpi-status-card strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
  color: #0f172a;
}

.command-btn {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-align: left;
  color: #0f172a;
}

.command-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.command-btn .cmd-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f3ff;
}

.command-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.command-search {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  outline: none;
}

.command-search:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96,165,250,.18);
}

.module-help {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.module-help-item {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  padding: 13px;
  border-radius: 16px;
}

.module-help-item b {
  display: block;
  margin-bottom: 4px;
}

.module-help-item span {
  color: #64748b;
  font-size: 13px;
}

@media(max-width: 1100px) {
  .kpi-status-row,
  .module-help {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media(max-width: 720px) {
  .kpi-status-row,
  .module-help {
    grid-template-columns: 1fr;
  }
}


/* ===== V16 FULL FIXED ===== */
.finance-income {
  color: #166534 !important;
  font-weight: 900;
}

.finance-expense {
  color: #991b1b !important;
  font-weight: 900;
}


/* ===== V17 STABLE FORMULA ===== */
.invoice-preview {
  font-size: 16px;
  line-height: 1.7;
}

.invoice-preview span {
  display: block;
  margin-top: 6px;
}

.card h3 {
  color: #0f172a;
}


/* ===== V18 ROLE BALANCED ===== */
.role-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-weight: 800;
}


/* V20 scope final */
select[multiple] {
  min-height: 130px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
}
select[multiple] option {
  padding: 6px;
}


/* V21 tab permissions */
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 8px;
}

.permission-check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dbe7ff;
  background: #fff;
  cursor: pointer;
}

.permission-check:hover {
  background: #f8fbff;
  border-color: #93c5fd;
}

.permission-check input {
  width: 18px;
  height: 18px;
}

.permission-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f3ff;
}

.permission-check b {
  display: block;
}

.permission-check small {
  color: #64748b;
  display: block;
}

.permission-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

@media(max-width: 1000px) {
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media(max-width: 650px) {
  .permission-grid {
    grid-template-columns: 1fr;
  }
}


/* V22 approval upgrade */
.badge.wait {
  background: #fef3c7;
  color: #92400e;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.approval-detail h3 {
  letter-spacing: -0.02em;
}

.approval-changed {
  background: #fff7ed;
}

.approval-changed td {
  border-color: #fed7aa !important;
}


/* V23 profile image + password */
.profile-panel {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-preview-img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid #dbe7ff;
  background: #f8fafc;
}

.image-placeholder {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px dashed #93c5fd;
  color: #64748b;
  background: #eff6ff;
}

.mini-avatar-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #dbe7ff;
}

.copy-box {
  padding: 16px;
  background: #0f172a;
  color: white;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
}

@media(max-width: 720px) {
  .profile-panel {
    grid-template-columns: 1fr;
  }
}


/* V24 permission UI fixed */
.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 8px;
}

.permission-check {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #dbe7ff;
  background: #fff;
  cursor: pointer;
}

.permission-check:hover {
  background: #f8fbff;
  border-color: #93c5fd;
}

.permission-check input {
  width: 18px;
  height: 18px;
}

.permission-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e8f3ff;
}

.permission-check b {
  display: block;
}

.permission-check small {
  color: #64748b;
  display: block;
}

.permission-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
  flex-wrap: wrap;
}

@media(max-width: 1000px) {
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media(max-width: 650px) {
  .permission-grid {
    grid-template-columns: 1fr;
  }
}


/* V25 image upload */
.upload-field {
  display: block;
}

.upload-box {
  border: 2px dashed #93c5fd;
  border-radius: 18px;
  background: #f8fbff;
  min-height: 160px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .18s ease;
}

.upload-box:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

.upload-preview {
  display: grid;
  place-items: center;
  gap: 6px;
  color: #475569;
  text-align: center;
  padding: 14px;
}

.upload-preview span {
  font-size: 38px;
}

.upload-preview b {
  font-size: 18px;
}

.upload-preview small {
  color: #64748b;
}

.upload-preview-img {
  max-width: 220px;
  max-height: 190px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #dbe7ff;
  display: block;
}

.remove-image-btn {
  margin-top: 8px;
  padding: 7px 12px;
  border: none;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

.mini-avatar-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #dbe7ff;
  background: #f8fafc;
}


/* V26 resident image fixed */
.upload-field {
  display: block;
}

.upload-box {
  border: 2px dashed #93c5fd;
  border-radius: 18px;
  background: #f8fbff;
  min-height: 160px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .18s ease;
}

.upload-box:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

.upload-preview {
  display: grid;
  place-items: center;
  gap: 6px;
  color: #475569;
  text-align: center;
  padding: 14px;
}

.upload-preview span {
  font-size: 38px;
}

.upload-preview b {
  font-size: 18px;
}

.upload-preview small {
  color: #64748b;
}

.upload-preview-img {
  max-width: 220px;
  max-height: 190px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid #dbe7ff;
  display: block;
}

.remove-image-btn {
  margin-top: 8px;
  padding: 7px 12px;
  border: none;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
}

.mini-avatar-img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid #dbe7ff;
  background: #f8fafc;
}


/* V27 meter reading */
.meter-formula {
  padding: 13px 15px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}
.meter-formula span {
  display: block;
  margin-top: 5px;
}


/* V28 contract signature */
.contract-paper {
  line-height: 1.65;
  color: #0f172a;
}

.contract-paper h2 {
  text-align: center;
  margin-bottom: 16px;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
  margin-top: 22px;
}

.signature-box {
  min-height: 150px;
  border: 1px dashed #94a3b8;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  background: #f8fafc;
}

.contract-status-line {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-weight: 800;
}

.badge.wait {
  background: #fef3c7;
  color: #92400e;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}


/* V31 approver select */
.approver-note {
  padding: 12px 14px;
  border-radius: 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}


/* V32 visible approver selector */
.approval-quick-card {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  margin: 0 0 16px;
  border-radius: 18px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
}

.approval-quick-card b {
  display: block;
  color: #1e3a8a;
  font-size: 18px;
}

.approval-quick-card small {
  display: block;
  color: #475569;
  margin-top: 4px;
}

.approval-quick-card select {
  height: 44px;
  border-radius: 12px;
  border: 1px solid #93c5fd;
  padding: 0 12px;
  background: white;
}

.approver-required-box {
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.approver-required-box b {
  display: block;
  font-size: 18px;
}

.approver-required-box span {
  display: block;
  margin-top: 4px;
}

@media(max-width: 800px) {
  .approval-quick-card {
    grid-template-columns: 1fr;
  }
}


/* V33 approver selector on every form */
.approval-inline-selector {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  margin: 0 0 16px;
  border-radius: 18px;
  border: 2px solid #2563eb;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .12);
}

.approval-inline-selector b {
  display: block;
  color: #1e3a8a;
  font-size: 20px;
}

.approval-inline-selector small {
  display: block;
  color: #475569;
  margin-top: 4px;
  font-weight: 700;
}

.approval-inline-selector select {
  height: 48px;
  border-radius: 14px;
  border: 1px solid #2563eb;
  padding: 0 14px;
  background: white;
  font-weight: 800;
  color: #0f172a;
}

@media(max-width: 900px) {
  .approval-inline-selector {
    grid-template-columns: 1fr;
  }
}


/* V34 approver list fix */
.approval-inline-selector select option {
  font-weight: 700;
}


/* V35 approval reason */
.approval-result-note {
  max-width: 340px;
  white-space: normal;
  line-height: 1.45;
}


/* V36 live approval feedback */
.approval-feedback-panel {
  margin: 0 0 18px;
  padding: 16px;
  border-radius: 22px;
  border: 2px solid #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 16px 40px rgba(37, 99, 235, .10);
}

.approval-feedback-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.approval-feedback-head b {
  display: block;
  font-size: 22px;
  color: #1e3a8a;
}

.approval-feedback-head span {
  color: #475569;
  font-weight: 700;
}

.approval-feedback {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid #dbeafe;
  background: white;
}

.approval-feedback.approved {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.approval-feedback.rejected {
  border-color: #fecaca;
  background: #fff1f2;
}

.approval-feedback-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.75);
  font-size: 26px;
}

.approval-feedback-body b {
  display: block;
  color: #0f172a;
  font-size: 17px;
}

.approval-feedback-body p {
  margin: 5px 0;
  color: #334155;
  font-weight: 700;
}

.approval-feedback-body small {
  color: #64748b;
}

.approval-feedback-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media(max-width: 900px) {
  .approval-feedback {
    grid-template-columns: 1fr;
  }
  .approval-feedback-actions {
    justify-content: flex-start;
  }
}


/* V37 approval feedback visibility */
.approval-feedback-panel {
  animation: approvalFeedbackIn .25s ease;
}

@keyframes approvalFeedbackIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}


/* V38 dashboard approval notification */
.dashboard-approval-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin: 16px 0;
}

.dashboard-approval-card {
  cursor: pointer;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  transition: .16s ease;
  position: relative;
  overflow: hidden;
}

.dashboard-approval-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
}

.dashboard-approval-card.hot {
  border: 2px solid #f97316;
  background: #fff7ed;
  animation: notifyPulse 1.2s ease infinite;
}

.dashboard-approval-card.approved {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.dashboard-approval-card.rejected {
  background: #fff1f2;
  border-color: #fecaca;
}

.dashboard-approval-card span {
  display: block;
  margin-top: 10px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-approval-card b {
  display: block;
  margin-top: 6px;
  font-size: 30px;
  color: #0f172a;
}

.dashboard-approval-card small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-weight: 700;
}

.dashboard-feedback-panel {
  margin-top: 12px;
}

.notify-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  margin-left: 4px;
}

.top-icon-btn.has-notify {
  animation: notifyPulse 1.2s ease infinite;
  border-color: #f97316 !important;
  background: #fff7ed !important;
}

.notify-metric {
  cursor: pointer;
  border: 2px solid #f97316 !important;
}

@keyframes notifyPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 0 6px rgba(249, 115, 22, .16); }
}

@media(max-width: 1100px) {
  .dashboard-approval-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media(max-width: 640px) {
  .dashboard-approval-strip { grid-template-columns: 1fr; }
}


/* V39 dashboard approval table fixed */
.dashboard-approval-table-card {
  margin-top: 16px;
}

.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.dashboard-card-head h2 {
  margin: 0;
}

.dashboard-card-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-weight: 700;
}

.approval-row-rejected {
  background: #fff1f2;
}

.approval-row-approved {
  background: #f0fdf4;
}

.dashboard-approval-table-card table td {
  vertical-align: top;
}

@media(max-width: 900px) {
  .dashboard-card-head {
    display: block;
  }
}


/* V41 approval always visible */
.approval-debug-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 800;
}


/* V42 read-only approval table */
.dashboard-approval-table-card::before {
  content: "Chế độ chỉ xem cho Quản lý/Nhập liệu";
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 900;
}


/* V45 login rule */
.copy-box { user-select: all; }
