:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#1e293b;background:#f3f5f8}
*{box-sizing:border-box}
body{margin:0}
a{color:#176747}
button,input,select{font:inherit}
button{cursor:pointer;border:0;border-radius:10px;padding:11px 16px;background:#124c36;color:white;font-weight:700;transition:background .15s}
button:hover:not(:disabled){background:#0e3d2b}
button:disabled{opacity:.48;cursor:not-allowed}
.secondary{background:#e7eee8;color:#124c36}
.secondary:hover:not(:disabled){background:#d8e4da}
.danger{background:#dc2626}
.danger:hover:not(:disabled){background:#b91c1c}

.shell{max-width:1060px;margin:auto;padding:20px}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}
.brand{font-size:20px;font-weight:800;letter-spacing:.06em;color:#124c36}
.sub{font-size:12px;letter-spacing:.1em;color:#64748b;text-transform:uppercase}
nav{display:flex;gap:12px;flex-wrap:wrap}
nav a{font-size:14px;text-decoration:none;font-weight:600}

body.is-admin{background:#f1f5f9}
.fabi-layout{display:flex;min-height:100vh}
.fabi-sidebar{width:248px;background:#16222f;color:#cbd5e1;display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh;overflow-y:auto;z-index:30}
.fabi-logo{padding:18px 20px;background:#0f172a;border-bottom:1px solid #1e293b;display:flex;align-items:center;justify-content:space-between}
.fabi-logo .brand{color:#fff;font-size:19px}
.fabi-logo .sub{color:#94a3b8;font-size:11px}
.fabi-nav{padding:12px 10px;display:flex;flex-direction:column;gap:4px;flex:1}
.fabi-nav-group{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;padding:12px 12px 4px;font-weight:700}
.fabi-nav a{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:8px;color:#cbd5e1;text-decoration:none;font-size:14px;font-weight:500;transition:all .15s}
.fabi-nav a:hover{background:#1e293b;color:#fff}
.fabi-nav a.active{background:#124c36;color:#fff;font-weight:700}
.fabi-badge-pill{background:#ef4444;color:#fff;font-size:11px;font-weight:700;padding:2px 7px;border-radius:99px}
.fabi-main{flex:1;min-width:0;display:flex;flex-direction:column}
.fabi-topbar{background:#fff;border-bottom:1px solid #e2e8f0;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:20}
.fabi-topbar-left{display:flex;align-items:center;gap:12px}
.fabi-menu-btn{display:none;background:#f1f5f9;color:#1e293b;padding:8px 12px;border-radius:8px;font-size:18px}
.fabi-page-title{font-size:17px;font-weight:700;color:#0f172a}
.fabi-topbar-right{display:flex;align-items:center;gap:10px;font-size:13px;color:#475569}
.fabi-content{padding:20px 24px;max-width:1360px;width:100%;margin:0 auto}

.fabi-dash-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:20px;align-items:start}
.fabi-hero-banner{background:linear-gradient(135deg,#e0f2fe 0%,#f0fdf4 100%);border:1px solid #bae6fd;border-radius:14px;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.fabi-hero-num{font-size:38px;font-weight:800;color:#0f172a;line-height:1.1;margin:6px 0}
.fabi-hero-sub{font-size:13px;color:#475569;line-height:1.6}
.fabi-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.fabi-stat-card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 2px 8px rgba(15,23,42,.03);text-decoration:none;color:inherit;display:block;transition:transform .12s,box-shadow .12s}
.fabi-stat-card:hover{transform:translateY(-2px);box-shadow:0 6px 16px rgba(15,23,42,.07)}
.fabi-stat-val{font-size:28px;font-weight:800;line-height:1.2;margin-bottom:6px}
.fabi-stat-val.red{color:#ef4444}
.fabi-stat-val.amber{color:#f59e0b}
.fabi-stat-val.blue{color:#0284c7}
.fabi-stat-val.green{color:#16a34a}
.fabi-stat-lbl{font-size:13px;font-weight:600;color:#64748b}

.fabi-shift-panel{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:18px 20px;box-shadow:0 2px 10px rgba(15,23,42,.03)}
.fabi-shift-group{margin-top:16px}
.fabi-shift-group:first-of-type{margin-top:8px}
.fabi-shift-header{font-size:14px;font-weight:750;color:#0f172a;padding-bottom:8px;border-bottom:1px solid #f1f5f9;display:flex;justify-content:space-between;align-items:center}
.fabi-emp-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;margin-top:8px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px}
.fabi-emp-left{display:flex;align-items:center;gap:10px;min-width:0}
.fabi-avatar{width:36px;height:36px;border-radius:99px;background:#cbd5e1;color:#1e293b;font-weight:750;font-size:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.fabi-avatar.online{background:#dcfce7;color:#15803d}
.fabi-avatar.late{background:#fee2e2;color:#b91c1c}
.fabi-emp-name{font-weight:700;font-size:14px;color:#0f172a}
.fabi-emp-meta{font-size:12px;margin-top:2px}
.fabi-emp-right{text-align:right;font-size:12px;flex-shrink:0}
.fabi-dept-tag{font-weight:700;color:#334155}
.st-ok{color:#16a34a;font-weight:650}
.st-late{color:#dc2626;font-weight:650}
.st-wait{color:#64748b;font-weight:600}
.st-miss{color:#ea580c;font-weight:700}

.card{background:white;border:1px solid #e2e8f0;border-radius:14px;padding:22px;margin:16px 0;box-shadow:0 4px 16px rgba(15,23,42,.03)}
.clock{font-size:clamp(38px,9vw,74px);font-weight:750;letter-spacing:-.06em;margin:8px 0}
.muted{color:#64748b}
.badge{display:inline-block;padding:6px 12px;border-radius:99px;background:#eaf3ed;color:#14583d;font-weight:700;font-size:13px}
.blocked{background:#fff1e9;color:#8f4c22}
.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}
.actions button{flex:1;min-width:145px;min-height:56px}
label{display:block;font-weight:650;margin:14px 0 6px;font-size:14px}
input,select{width:100%;border:1px solid #cbd5e1;border-radius:9px;padding:10px 12px;background:white;min-height:42px}
.row{display:flex;gap:14px;align-items:end;flex-wrap:wrap}
.row>*{flex:1;min-width:160px}
.row button{flex:0 0 auto}
.alert{border-radius:10px;padding:12px 16px;margin:12px 0;background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;font-size:14px}
.alert a{font-weight:700;color:#047857}
.error{background:#fef2f2;border:1px solid #fecaca;color:#991b1b}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{text-align:left;padding:11px;border-bottom:1px solid #e2e8f0}
th{color:#475569;font-weight:700;background:#f8fafc}
.scroll{overflow:auto}
h1{font-size:clamp(22px,4vw,28px);margin:4px 0 16px;color:#0f172a}
h2{font-size:18px;margin:0 0 12px;color:#0f172a}
.small{font-size:13px}
.auth{max-width:440px;margin:8vh auto}
.right{text-align:right}

.week-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.week-nav a{text-decoration:none;font-weight:600}
.schedule-day{margin:12px 0}
.schedule-day h2{margin-bottom:8px}
.planned{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-top:1px solid #e2e8f0}
.planned-actions{display:flex;align-items:center;gap:12px}
.planned-actions form{margin:0}
.planned-actions button{padding:8px 12px}
.late-warning{background:#fef2f2;border:1px solid #f87171;color:#991b1b;font-weight:750}
.inline-form{display:inline-block;margin:2px}
.inline-form button{padding:8px 12px}
table td{vertical-align:top}

.roster{min-width:960px;border-collapse:separate;border-spacing:0;text-align:center}
.roster th,.roster td{border:1px solid #dce5dd;padding:12px 8px;text-align:center;min-width:110px;vertical-align:middle}
.roster thead th{background:#e6ede8;color:#234a37;font-weight:750;white-space:nowrap}
.roster thead th:first-child,.roster tbody th{position:sticky;left:0;z-index:2;min-width:165px;max-width:185px;text-align:left;background:#dcecf3;color:#194154}
.roster thead th:first-child{z-index:3;background:#d2e6ef}
.roster tbody td{font-size:13px;font-weight:700}
.roster-05{background:#fbe0ac}
.roster-06{background:#ffd2b2}
.roster-08{background:#ffeac0}
.roster-other{background:#42484a;color:white}
.roster-off{background:#cceec4;color:#145337}
.roster-pending{background:#ecdbf7;color:#633477}
.roster-empty{background:#f7f9f7;color:#89948e}
.roster-actions{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:6px;font-size:12px;font-weight:400}
.roster-actions form{margin:0}
.roster-actions button{padding:4px 7px;font-size:12px;min-height:0}
.roster-scroll{border-radius:10px}

textarea{width:100%;min-height:96px;border:1px solid #cbd5e1;border-radius:9px;padding:12px;background:white;font:inherit;resize:vertical}
.kpi-score{font-size:clamp(40px,9vw,64px);font-weight:800;color:#124c36;line-height:1.1}
.kpi-score span{font-size:18px;color:#637268;font-weight:600}
.kpi-event{padding:16px 0;border-top:1px solid #e2e8f0;overflow-wrap:anywhere}
.kpi-event:first-of-type{border-top:0}
.kpi-event form{margin-top:12px}
.kpi-void{background:#f8fafc;color:#64748b;padding:16px;border-radius:12px}

@media(max-width:960px){
  .fabi-dash-grid{grid-template-columns:1fr}
  .fabi-sidebar{position:fixed;left:-260px;transition:left .2s}
  .fabi-sidebar.open{left:0}
  .fabi-menu-btn{display:inline-block}
  .fabi-content{padding:14px}
}
@media(max-width:560px){
  .shell{padding:14px}
  .card{padding:16px}
  .top{align-items:start;flex-direction:column}
  .actions{flex-direction:column}
  .actions button{width:100%}
  .fabi-stat-grid{grid-template-columns:repeat(2,1fr)}
  .planned{align-items:flex-start}
  .week-nav b{order:-1;width:100%}
}
/* HAKYO HRM THEME */
:root {
  --ivory: #F8F5EE;
  --ivory-card: #FFFFFF;
  --ivory-soft: #F1ECE1;
  --chestnut: #846249;
  --chestnut-dark: #684B36;
  --ochre: #A6752A;
  --crimson: #C82828;
  --text-main: #2D221B;
  --text-muted: #78675B;
  --border-soft: #E5DDD0;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0 !important;
  padding: 0 !important;
  background: var(--ivory) !important;
  color: var(--text-main) !important;
  font-family: 'Lexend Deca', system-ui, -apple-system, sans-serif !important;
}
body { padding-bottom: 76px !important; }
a { color: var(--chestnut) !important; }

.shell {
  max-width: 540px !important;
  margin: 0 auto !important;
  padding: 0 14px 24px !important;
}

/* Topbar nau Roasted Chestnut sat mep tren */
.top {
  margin: 0 -14px 14px -14px !important;
  background: var(--chestnut) !important;
  color: #FFFDF9 !important;
  padding: 14px 16px !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: 0 3px 12px rgba(45, 34, 27, 0.14) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.top b, .top strong, .top span, .top div { color: #FFFDF9 !important; }
.top b, .top strong {
  font-family: 'Playfair Display', serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  display: block;
}
.top .muted, .top small {
  font-size: 11px !important;
  opacity: 0.88 !important;
  letter-spacing: 0.06em !important;
}
.top nav, .top > div:last-child {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 6px !important;
  padding-top: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
  -webkit-overflow-scrolling: touch;
}
.top nav::-webkit-scrollbar, .top > div:last-child::-webkit-scrollbar { display: none; }
.top a {
  flex: 0 0 auto !important;
  color: #FFFDF9 !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.24) !important;
  padding: 5px 11px !important;
  border-radius: 99px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* The chao nhan vien co avatar tron */
.shell > h1:first-of-type {
  background: var(--ivory-card) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 16px !important;
  padding: 13px 15px !important;
  margin: 0 0 12px 0 !important;
  font-family: 'Lexend Deca', sans-serif !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  box-shadow: 0 3px 12px rgba(132, 98, 73, 0.06) !important;
}
.shell > h1:first-of-type::before {
  content: "HK";
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--ivory-soft);
  border: 1.5px solid var(--ochre);
  color: var(--chestnut);
  font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.alert {
  background: #FFFDF9 !important;
  border: 1px solid #E5D5B7 !important;
  border-left: 4px solid var(--ochre) !important;
  color: var(--text-main) !important;
  border-radius: 12px !important;
  padding: 10px 13px !important;
  margin: 0 0 10px 0 !important;
  font-size: 13px !important;
}
.alert a { color: var(--ochre) !important; font-weight: 700 !important; }

/* The noi dung & Dong ho */
.card {
  background: var(--ivory-card) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 18px !important;
  padding: 18px 14px !important;
  margin-bottom: 14px !important;
  box-shadow: 0 3px 12px rgba(132, 98, 73, 0.06) !important;
}
.clock {
  font-size: 42px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  letter-spacing: -0.03em !important;
  margin: 2px 0 10px !important;
  text-align: center !important;
}
.badge {
  background: #F5E8D3 !important;
  color: var(--ochre) !important;
  border: 1px solid #E8D3B0 !important;
  border-radius: 99px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
}
.blocked {
  background: #FFF2F2 !important;
  color: var(--crimson) !important;
  border: 1px solid #F3BDBD !important;
}

/* Chi bien nut Vao ca / Ra ca o khoi .actions thanh NUT TRON 156px */
.actions {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 18px 0 8px !important;
}
.actions form {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}
.actions button:disabled { display: none !important; }
.actions button:not(:disabled) {
  width: 156px !important; height: 156px !important;
  min-width: 156px !important; min-height: 156px !important;
  border-radius: 50% !important;
  border: 6px solid #EFE7DA !important;
  background: linear-gradient(145deg, var(--chestnut), var(--chestnut-dark)) !important;
  color: #FFFDF9 !important;
  font-size: 17px !important; font-weight: 700 !important;
  text-transform: uppercase !important;
  box-shadow: 0 10px 24px rgba(132, 98, 73, 0.34) !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  cursor: pointer !important;
}
.actions button.danger:not(:disabled) {
  background: linear-gradient(145deg, #D93838, var(--crimson)) !important;
  border-color: #FADADA !important;
  box-shadow: 0 10px 24px rgba(200, 40, 40, 0.32) !important;
}
.actions:has(button:disabled + button:disabled) button:first-of-type,
.actions form:has(button:disabled):not(:has(button:not(:disabled))) button:first-of-type {
  display: inline-flex !important;
  width: 156px !important; height: 156px !important;
  border-radius: 50% !important;
  border: 6px solid #E6E0DA !important;
  background: #B8AEA6 !important;
  color: #FFFDF9 !important;
  font-size: 16px !important; font-weight: 700 !important;
  text-transform: uppercase !important;
  align-items: center !important; justify-content: center !important;
}

/* Cac nut o trang Dang ky ca, Nghi phep, KPI giu nguyen hien thi ro rang */
button:not(.actions button) {
  background: linear-gradient(145deg, var(--chestnut), var(--chestnut-dark)) !important;
  color: #FFFDF9 !important;
  border-radius: 11px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
.secondary {
  background: var(--ivory-soft) !important;
  color: var(--chestnut) !important;
  border: 1px solid var(--border-soft) !important;
}
input, select, textarea {
  border: 1px solid var(--border-soft) !important;
  background: #FFFDF9 !important;
  color: var(--text-main) !important;
  border-radius: 10px !important;
}
th { background: var(--ivory-soft) !important; color: var(--chestnut) !important; }
.roster thead th { background: var(--ivory-soft) !important; color: var(--chestnut) !important; }
.roster thead th:first-child, .roster tbody th { background: #EFE7DA !important; color: var(--text-main) !important; }
.roster-05 { background: #EADFD2 !important; color: var(--chestnut-dark) !important; border-left: 3px solid var(--chestnut) !important; }
.roster-06 { background: #F5E8D3 !important; color: #7C5318 !important; border-left: 3px solid var(--ochre) !important; }
.roster-08 { background: #FBF4E4 !important; color: #5C4938 !important; border-left: 3px solid #C59B5F !important; }
.roster-off { background: #EBF5EE !important; color: #1E6B47 !important; }
.roster-pending { background: #F9EBEB !important; color: var(--crimson) !important; }

/* Thanh dieu huong co dinh duoi day man hinh dung tham so ?page=... */
.hakyo-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #FFFFFF; border-top: 1px solid var(--border-soft);
  display: flex; justify-content: space-around;
  padding: 9px 4px 13px; z-index: 999;
  box-shadow: 0 -2px 10px rgba(45, 34, 27, 0.05);
}
.hakyo-bottom-nav a {
  text-decoration: none !important;
  font-size: 11.5px !important; font-weight: 600 !important;
  color: var(--text-muted) !important;
}
.hakyo-bottom-nav a.active { color: var(--chestnut) !important; font-weight: 700 !important; }

/* Tren PC mo rong khung hien thi cho bang lich tuan & duyet cong */
@media (min-width: 768px) {
  .shell { max-width: 1040px !important; padding: 0 24px 60px !important; }
  .top { margin: 0 0 18px 0 !important; border-radius: 0 0 18px 18px !important; }
  .top nav, .top > div:last-child { flex-wrap: wrap !important; justify-content: center !important; overflow: visible !important; }
}
/* PINNED LOGOUT */
.top { position: relative !important; }
.hakyo-top-logout {
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  background: rgba(200, 40, 40, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  color: #FFFDF9 !important;
  padding: 5px 11px !important;
  border-radius: 99px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  z-index: 10 !important;
}
.hakyo-bottom-nav a.nav-logout { color: var(--crimson) !important; }
/* SHOW ALL MENU BUTTONS */
.top { position: relative !important; padding-top: 16px !important; }
.top nav, .top > div:last-child {
  flex-wrap: wrap !important;
  overflow-x: visible !important;
  gap: 6px !important;
}
.top a {
  padding: 5px 10px !important;
  font-size: 11.5px !important;
}
.hakyo-top-logout {
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  background: #C82828 !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  color: #FFFDF9 !important;
  padding: 5px 11px !important;
  border-radius: 99px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  z-index: 20 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
}
/* HIDE TOP LOGOUT */
.top a[href*="logout"], .hakyo-top-logout {
  display: none !important;
}


/* OFFICIAL HAKYO LOGO */
.top > div:first-child {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}
.hakyo-official-logo {
  height: 38px !important;
  width: auto !important;
  max-width: 150px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  filter: brightness(2.8) contrast(1.2) !important;
}/* ===== HAKYO FABI-STYLE MOBILE UI ===== */
body {
  background: #F8F5EE !important;
  color: #3A2A1E !important;
  font-family: 'Lexend Deca', sans-serif !important;
  padding-bottom: 76px !important;
}
header.top {
  background: #846249 !important;
  color: #F8F5EE !important;
  padding: 14px 16px 12px !important;
  border-radius: 0 0 18px 18px !important;
  margin-bottom: 14px !important;
}
.top-head-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}
.brand-lockup {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.hakyo-official-logo {
  height: 36px !important;
  width: auto !important;
  object-fit: contain !important;
  filter: brightness(2.8) contrast(1.2) !important;
}
header.top .sub {
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #F8F5EE !important;
  opacity: 0.92 !important;
  font-weight: 500 !important;
}
.wifi-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}
.wifi-pill.is-ok {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #F8F5EE !important;
}
.wifi-pill.is-off {
  background: rgba(200, 40, 40, 0.28) !important;
  color: #FFE4E4 !important;
}
.wifi-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: #5EE07F !important;
}
.wifi-pill.is-off .wifi-dot {
  background: #FF6B6B !important;
}
nav.top-menu-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  gap: 6px !important;
  margin-top: 10px !important;
  padding-bottom: 2px !important;
  scrollbar-width: none !important;
}
nav.top-menu-bar::-webkit-scrollbar { display: none !important; }
nav.top-menu-bar a {
  flex: 0 0 auto !important;
  font-size: 11.5px !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #F8F5EE !important;
  text-decoration: none !important;
}

/* Card 1: Avatar + Loi chao */
.card {
  background: #FFFFFF !important;
  border: 1px solid #EAE2D3 !important;
  border-radius: 18px !important;
  box-shadow: 0 4px 14px rgba(58, 42, 30, 0.04) !important;
}
.greet-card {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 14px 16px !important;
}
.avatar-ring {
  flex: 0 0 46px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  border: 1.5px solid #A6752A !important;
  background: #F8F5EE !important;
  color: #846249 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.greet-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #3A2A1E !important;
  line-height: 1.3 !important;
}
.greet-sub {
  font-size: 12px !important;
  color: #846249 !important;
  margin-top: 2px !important;
  line-height: 1.35 !important;
}
.greet-shift {
  font-size: 11.5px !important;
  color: #A6752A !important;
  font-weight: 600 !important;
  margin-top: 4px !important;
}

/* Card 2: Dong ho + Nut tron lon */
.hero-punch-card {
  text-align: center !important;
  padding: 20px 16px !important;
}
.hero-date {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-size: 16px !important;
  color: #846249 !important;
}
.hero-clock {
  font-size: 40px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em !important;
  color: #2B1E16 !important;
  margin: 4px 0 16px !important;
}
.circle-punch-btn {
  width: 148px !important;
  height: 148px !important;
  border-radius: 50% !important;
  border: 6px solid #EFE8DC !important;
  background: #846249 !important;
  color: #FFFFFF !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-shadow: 0 10px 24px rgba(132, 98, 73, 0.28) !important;
  cursor: pointer !important;
  transition: transform 0.15s ease !important;
}
.circle-punch-btn.is-out {
  background: #A6752A !important;
}
.circle-punch-btn:disabled {
  background: #C7BBAE !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}
.circle-punch-btn:not(:disabled):active {
  transform: scale(0.96) !important;
}
.cp-main {
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
}
.cp-sub {
  font-size: 11px !important;
  opacity: 0.9 !important;
}
.rule-pills {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-top: 18px !important;
}
.rpill {
  font-size: 11.5px !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  background: #F4EFE6 !important;
  color: #6E5847 !important;
  font-weight: 500 !important;
}
.rpill.is-active {
  background: #A6752A !important;
  color: #FFFFFF !important;
}

/* Card 3: Luoi 4 o thong ke 2x2 */
.stat-grid-4 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-bottom: 14px !important;
}
.stat-tile {
  margin: 0 !important;
  padding: 14px 16px !important;
}
.st-val {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: #5C4332 !important;
  line-height: 1.2 !important;
}
.st-val.is-gold { color: #A6752A !important; }
.st-val.is-red { color: #C82828 !important; }
.st-lbl {
  font-size: 12px !important;
  color: #8A796B !important;
  margin-top: 4px !important;
}

/* Thanh dieu huong duoi day */
.hakyo-bottom-nav {
  position: fixed !important;
  left: 0; right: 0; bottom: 0;
  z-index: 999 !important;
  background: #FFFFFF !important;
  border-top: 1px solid #E6DEC8 !important;
  display: flex !important;
  justify-content: space-around !important;
  align-items: center !important;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom)) !important;
}
.hakyo-bottom-nav a {
  text-decoration: none !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #5C4332 !important;
}
.hakyo-bottom-nav a.nav-logout {
  color: #C82828 !important;
}

/* 1. Thanh menu tren cung: ep gon dung 2 hang (4 nut/hang) */
@media (max-width: 768px) {
  header.top {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
  header.top nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    padding: 6px 0 2px 0 !important;
    overflow: visible !important;
  }
  header.top nav a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 10.5px !important;
    padding: 6px 2px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* 2. Khoi phuc nut tron VAO CA / RA CA chuan HAKYO (ke ca khi disabled) */
.hero-form {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}
button.circle-punch-btn,
button.circle-punch-btn:disabled {
  width: 168px !important;
  height: 168px !important;
  border-radius: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  margin: 14px auto !important;
  border: 6px solid #EFE6D8 !important;
  box-shadow: 0 10px 24px rgba(132, 98, 73, 0.25) !important;
  transition: transform 0.15s ease !important;
}
button.circle-punch-btn.is-in,
button.circle-punch-btn.is-in:disabled {
  background: linear-gradient(145deg, #9A7458 0%, #846249 100%) !important;
  color: #F8F5EE !important;
}
button.circle-punch-btn.is-out,
button.circle-punch-btn.is-out:disabled {
  background: linear-gradient(145deg, #D63A3A 0%, #C82828 100%) !important;
  color: #F8F5EE !important;
}
button.circle-punch-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}
button.circle-punch-btn .cp-main {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  line-height: 1.2 !important;
}
button.circle-punch-btn .cp-sub {
  font-size: 11.5px !important;
  font-weight: 400 !important;
  opacity: 0.9 !important;
}
