:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-alt: #f9fafc;
  --border: #e5e8f0;
  --border-strong: #d1d6e3;
  --text: #182033;
  --text-muted: #5d677d;
  --primary: #e85d2a;
  --primary-hover: #d14c1b;
  --primary-soft: #fff2ec;
  --success: #0f9d58;
  --success-soft: #e8f7ef;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;

  /* 4 Branch Colors */
  --cs1: #2563eb;
  --cs1-bg: #eff6ff;
  --cs2: #059669;
  --cs2-bg: #ecfdf5;
  --cs3: #9333ea;
  --cs3-bg: #faf5ff;
  --cs4: #ea580c;
  --cs4-bg: #fff7ed;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);
}

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

body {
  font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

/* Header */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.brand h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.domain-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 999px;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
}

.sync-badge.synced {
  color: var(--success);
  background: var(--success-soft);
  border-color: #bbf7d0;
}

.sync-badge.synced .sync-dot {
  background: var(--success);
}

/* Month Bar */
.month-bar {
  background: linear-gradient(135deg, #fff8f5 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

.month-bar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.month-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  padding: 7px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.month-display {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.month-native-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.month-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.month-pill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.month-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.month-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Main Grid */
.main-grid {
  max-width: 1380px;
  margin: 0 auto;
  padding: 18px 20px 32px;
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.form-card {
  padding: 20px;
  position: sticky;
  top: 76px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.card-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.card-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Form Elements */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.req {
  color: var(--danger);
}

.opt,
.label-hint {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.time-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 93, 42, 0.14);
}

/* 4 Branch Selector Pills */
.branch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.branch-option {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 11px;
  min-height: 58px;
  background: var(--surface-alt);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
}

.branch-option:hover {
  border-color: var(--border-strong);
  background: var(--surface);
}

.branch-option-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.branch-option-meta {
  font-size: 0.71rem;
  color: var(--text-muted);
}

.branch-option.active[data-branch="CAFE_CS1"] {
  border-color: var(--cs1);
  background: var(--cs1-bg);
}
.branch-option.active[data-branch="KID_CS1"] {
  border-color: var(--cs2);
  background: var(--cs2-bg);
}
.branch-option.active[data-branch="CS2_NHS"] {
  border-color: var(--cs3);
  background: var(--cs3-bg);
}
.branch-option.active[data-branch="CS3_PH"] {
  border-color: var(--cs4);
  background: var(--cs4-bg);
}

/* Autocomplete */
.autocomplete-wrap {
  position: relative;
}

.input-with-clear {
  position: relative;
}

.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.78rem;
}

.autocomplete-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 240px;
  overflow-y: auto;
  z-index: 50;
}

.ac-item {
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
}

.ac-item:last-child {
  border-bottom: none;
}

.ac-item:hover {
  background: var(--primary-soft);
}

.ac-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.ac-code {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.ac-section-title {
  padding: 6px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

/* Date Row */
.date-row {
  display: flex;
  gap: 8px;
}

.date-row .form-control {
  flex: 1;
}

/* Shift Boxes & 24h Time Picker */
.shift-box {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.shift-box-2 {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.shift-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.shift-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.shift-badge-2 {
  background: #ede9fe;
  color: #6d28d9;
}

.tz-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
}

.link-danger {
  border: none;
  background: transparent;
  color: var(--danger);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.time-grid-24 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.picker-24-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-select {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 6px;
  border: 1.5px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.time-colon {
  font-weight: 800;
  color: var(--text-muted);
  font-size: 1rem;
}

.btn-now {
  width: 36px;
  height: 42px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.btn-now:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.shift2-toggle-wrap {
  margin-bottom: 12px;
}

.duration-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
  font-size: 0.84rem;
  margin-bottom: 14px;
}

.duration-preview.has-hours {
  background: var(--success-soft);
  border-color: #86efac;
  color: #065f46;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
  min-height: 46px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #0b8043;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-alt);
  color: var(--text);
}

/* Branch Summary Cards */
.branch-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.branch-stat-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
}

.branch-stat-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.branch-stat-card.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.branch-stat-card.active[data-branch="CAFE_CS1"] {
  border-color: var(--cs1);
  background: var(--cs1-bg);
}
.branch-stat-card.active[data-branch="KID_CS1"] {
  border-color: var(--cs2);
  background: var(--cs2-bg);
}
.branch-stat-card.active[data-branch="CS2_NHS"] {
  border-color: var(--cs3);
  background: var(--cs3-bg);
}
.branch-stat-card.active[data-branch="CS3_PH"] {
  border-color: var(--cs4);
  background: var(--cs4-bg);
}

.bs-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.25;
  margin-bottom: 5px;
}

.bs-count {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.bs-hours {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Stats Strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.12rem;
  font-weight: 800;
}

.text-primary {
  color: var(--primary);
}

.text-warn {
  color: var(--warn);
}

/* Table Card */
.table-card {
  overflow: hidden;
}

.table-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-group {
  display: inline-flex;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 7px 12px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  font-size: 0.8rem;
  pointer-events: none;
}

.search-box input {
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  width: 210px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background: #fcfcfd;
}

.th-actions,
.td-actions {
  text-align: right;
  white-space: nowrap;
}

.empty-cell {
  text-align: center;
  padding: 36px 16px !important;
  color: var(--text-muted);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-CAFE_CS1,
.badge-CS1 {
  background: var(--cs1-bg);
  color: var(--cs1);
}
.badge-KID_CS1 {
  background: var(--cs2-bg);
  color: var(--cs2);
}
.badge-CS2_NHS,
.badge-CS2 {
  background: var(--cs3-bg);
  color: var(--cs3);
}
.badge-CS3_PH,
.badge-CS3 {
  background: var(--cs4-bg);
  color: var(--cs4);
}
.badge-default {
  background: var(--surface-alt);
  color: var(--text);
}

.ca-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
}

.ca-pill.ca-2 {
  background: #ede9fe;
  color: #6d28d9;
}

.emp-name-cell {
  font-weight: 600;
  color: var(--text);
}

.emp-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.time-chip {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.time-chip.in {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.time-chip.out {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.time-chip.missing {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: #fde68a;
  font-weight: 600;
  font-size: 0.74rem;
}

.hours-pill {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.action-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 5px 9px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
}

.action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.action-btn.checkout {
  background: var(--warn-soft);
  border-color: #fcd34d;
  color: #92400e;
}

.action-btn.delete:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

/* Mobile Cards List */
.mobile-only {
  display: none;
}

.mobile-cards-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-record-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.m-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.m-card-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.m-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.m-card-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-alt);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.m-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.m-card-actions .action-btn {
  margin-left: 0;
  flex: 1;
  min-height: 36px;
  font-size: 0.8rem;
}

/* Mobile Bottom Nav */
.mobile-bottom-nav {
  display: none;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #182033;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 120;
  max-width: 360px;
}

.toast.success {
  background: #065f46;
}

.toast.error {
  background: #b91c1c;
}

/* Tablet */
@media (max-width: 1120px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    position: static;
  }
  .branch-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile-First Dedicated Layout */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: flex;
  }

  .hide-xs {
    display: none !important;
  }

  .topbar-inner,
  .month-bar-inner {
    padding: 10px 12px;
  }

  .main-grid {
    padding: 12px 12px 20px;
    gap: 14px;
  }

  .form-card {
    padding: 16px 14px;
  }

  .form-control,
  .time-select,
  .search-box input {
    font-size: 16px; /* Ngăn iOS tự động zoom khi chạm ô nhập */
  }

  .time-grid-24 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .month-bar-right {
    width: 100%;
    justify-content: space-between;
  }

  #btn-export-payroll-top {
    display: none;
  }

  .branch-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .toolbar-right,
  .search-box,
  .search-box input {
    width: 100%;
  }

  .toolbar-right .btn-success {
    width: 100%;
  }

  /* Chuyển đổi mượt giữa Tab Chấm công & Bảng tháng trên điện thoại */
  body.mobile-view-form #section-records {
    display: none;
  }
  body.mobile-view-records #section-form {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  }

  .mnav-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 6px 4px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
  }

  .mnav-icon {
    font-size: 1.15rem;
    line-height: 1.1;
  }

  .mnav-btn.active {
    color: var(--primary);
    background: var(--primary-soft);
  }

  .mnav-btn.mnav-export {
    color: var(--success);
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    text-align: center;
  }
}
