/* CARD */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* TABLE */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  overflow: hidden;
}

.table th {
  font-size: 13px;
  color: #475569;
  padding: 8px 6px;
  text-align: center;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 3;
}

.table td {
  background: #ffffff;
  padding: 6px 4px;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  vertical-align: middle;
}

.table td a {
  display: block;
  width: 100%;
  height: 100%;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}

.table td.sticky a:hover {
  color: #1d4ed8;
}

.table tbody tr:nth-child(odd) td {
  background: #f8fafc;
}

.table tbody tr:hover td {
  background: #a7cdff !important;
}

.table td.sticky {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

.employees-list-table {
  table-layout: auto;
}

.employees-list-table col.employees-col-id {
  width: 72px;
}

.employees-list-table col.employees-col-name {
  width: 180px;
}

.employees-list-table col.employees-col-dob {
  width: 118px;
}

.employees-list-table col.employees-col-start-date {
  width: 150px;
}

.employees-list-table col.employees-col-salary {
  width: 180px;
}

.employees-list-table col.employees-col-branch {
  width: 120px;
}

.employees-list-table col.employees-col-username {
  width: 136px;
}

.employees-list-table col.employees-col-role {
  width: 150px;
}

.employees-list-table col.employees-col-classification {
  width: 120px;
}

.employees-list-table col.employees-col-status {
  width: 112px;
}

.employees-list-table col.employees-col-note {
  width: auto;
}

.employees-list-table th[data-column-id="id"],
.employees-list-table td[data-column-id="id"] {
  white-space: nowrap;
}

.employees-list-table th[data-column-id="status"],
.employees-list-table td[data-column-id="status"] {
  white-space: nowrap;
}

.employees-list-table th[data-column-id="dob"],
.employees-list-table td[data-column-id="dob"],
.employees-list-table th[data-column-id="branch"],
.employees-list-table td[data-column-id="branch"],
.employees-list-table th[data-column-id="classification"],
.employees-list-table td[data-column-id="classification"] {
  white-space: nowrap;
}

.employees-list-table td[data-column-id="note"] {
  min-width: 240px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #475569;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.week-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center !important;
}

.week-controls-range {
  width: 100%;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding-top: 6px;
}

.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.schedule-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.schedule-toolbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1 1 560px;
}

.schedule-summary-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1 1 520px;
}

.schedule-filter-label {
  display: flex;
  gap: 15px;
  min-width: 200px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.schedule-filter-label select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  background: #ffffff;
}

.schedule-filter-note,
.schedule-mini-text {
  font-size: 12px;
  color: #64748b;
}

.schedule-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.schedule-toggle input {
  width: 16px;
  height: 16px;
}

.schedule-area-sections {
  display: grid;
  gap: 18px;
}

.schedule-area-panel {
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
}

.schedule-area-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  cursor: pointer;
  user-select: none;
}

.schedule-area-panel-header h3 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #0f172a;
}

.schedule-area-panel-header:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 4px;
  border-radius: 14px;
}

.schedule-area-panel-main {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
}

.schedule-area-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
  flex: 0 0 auto;
  pointer-events: none;
}

.schedule-area-panel-header:hover .schedule-area-toggle {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.schedule-area-toggle-icon {
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.schedule-area-panel.is-collapsed .schedule-area-toggle-icon {
  transform: rotate(0deg);
}

.schedule-area-panel-body {
  overflow: hidden;
  max-height: none;
  opacity: 1;
  transform: translateY(0);
  transform-origin: top center;
  transition:
    max-height 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.24s ease,
    transform 0.28s ease;
}

.schedule-area-panel.is-collapsed {
  padding-bottom: 14px;
}

.schedule-area-panel.is-collapsed .schedule-area-panel-body {
  opacity: 0;
}

.schedule-area-summary-head {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.schedule-summary-label {
  min-width: 140px;
}

.schedule-stats-grid-global {
  min-width: min(100%, 520px);
}

.schedule-off-cell {
  display: grid;
  place-items: center;
  min-height: 88px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.schedule-stats-caption {
  font-size: 12px;
  color: #64748b;
}

.schedule-area-panel-header p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

.schedule-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  min-width: min(100%, 520px);
}

.schedule-stat-card {
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 10px 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.schedule-stat-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 6px;
}

.schedule-stat-card strong {
  font-size: 22px;
  color: #0f172a;
}

.schedule-day-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.schedule-day-tab {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 66px;
  border: 1px solid #dbe5ef;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.schedule-day-tab span {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.schedule-day-tab.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.schedule-restricted-blur {
  filter: blur(10px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.schedule-restricted-off {
  filter: blur(3px);
  opacity: 0.45;
  display: inline-block;
}

.page-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.page-section-title {
  margin: 0 0 6px;
  font-size: 24px;
  color: #0f172a;
}

.page-section-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}

.area-inline-form,
.area-row-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.area-inline-form {
  margin-bottom: 18px;
}

.area-inline-form select,
.area-inline-form input,
.area-row-form select,
.area-row-form input {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
}

.area-inline-form input {
  min-width: min(100%, 420px);
}

.area-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.areas-alert {
  margin-bottom: 0;
}

.branch-admin-shell {
  padding: 20px;
}

.branch-admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
}

.branch-create-panel,
.branch-list-panel {
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
}

.branch-create-panel h3,
.branch-list-panel h3 {
  margin: 0 0 12px;
  color: #0f172a;
}

.branch-create-form,
.branch-admin-item,
.branch-admin-item-body,
.branch-admin-list,
.area-rows-stack {
  display: grid;
  gap: 12px;
}

.branch-create-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 600;
}

.branch-create-form input,
.branch-admin-item-body input,
.area-branch-create-form input {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
}

.branch-admin-item {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.branch-admin-item-head,
.area-branch-head p,
.area-empty-state {
  color: #64748b;
  font-size: 13px;
}

.branch-admin-item-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.branch-admin-item-head strong {
  color: #0f172a;
}

.branch-admin-item-body {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.branch-admin-item.is-dirty,
.area-row-form.is-dirty {
  border-color: #bfdbfe;
}

.area-branch-card {
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.area-branch-card-compact {
  display: grid;
  grid-template-rows: auto 1fr;
}

.area-branch-head {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #f8fafc;
}

.area-branch-head h3 {
  margin: 0;
  color: #0f172a;
}

.area-branch-head p {
  margin: 6px 0 0;
}

.area-branch-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.area-branch-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: center;
}

.area-branch-create-form input {
  min-height: 38px;
  padding: 8px 12px;
  line-height: 1.2;
}

.area-create-button {
  min-height: 38px;
  width: 112px;
  padding: 6px 10px;
  white-space: nowrap;
}

.area-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  padding: 10px;
}

.area-row-form-grow {
  flex: 1 1 auto;
}

.area-row-form {
  align-items: center;
  flex-wrap: nowrap;
}

.area-row-form input {
  flex: 1 1 auto;
}

.js-save-button.is-dirty {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.js-save-button.is-dirty:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.area-delete-form {
  display: flex;
  align-items: center;
}

.area-delete-button {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
  font-weight: 500;
  text-transform: lowercase;
}

.area-empty-state {
  border: 1px dashed #dbe5ef;
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px;
}

.schedule-editor-shell {
  padding: 18px;
}

.schedule-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.schedule-editor-title-group {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.schedule-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.schedule-save-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 13px;
  font-weight: 700;
}

.schedule-editor-legend {
  margin-bottom: 16px;
}

.schedule-editor-list {
  display: grid;
  gap: 16px;
}

.schedule-editor-day-card {
  display: grid;
  grid-template-columns: 180px 220px 1fr;
  gap: 16px;
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 16px;
}

.schedule-editor-day-meta,
.schedule-editor-current,
.schedule-editor-actions {
  min-width: 0;
}

.schedule-editor-day-label {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.schedule-editor-day-date {
  color: #64748b;
  font-size: 14px;
}

.schedule-editor-card-title {
  margin-bottom: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-editor-current-box {
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  min-height: 92px;
}

.schedule-editor-current-box.is-empty {
  display: grid;
  place-items: center;
  color: #64748b;
}

.schedule-choice-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.schedule-choice-group .shift-btn,
.schedule-choice-group .branch-btn {
  min-width: 72px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  color: #ffffff;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    filter 0.18s ease;
}

.schedule-choice-group .shift-btn.off {
  background: #ef4444;
}

.schedule-choice-group .shift-btn.morning {
  background: #3b82f6;
}

.schedule-choice-group .shift-btn.evening {
  background: #d97706;
}

.schedule-choice-group .shift-btn.full {
  background: #22c55e;
}

.schedule-choice-group .branch-btn.tp {
  background: #16a34a;
}

.schedule-choice-group .branch-btn.gv {
  background: #ea580c;
}

.schedule-choice-group .branch-btn.q12 {
  background: #a855f7;
}

.schedule-choice-group .shift-btn.custom,
.schedule-choice-group .branch-btn.none {
  background: #64748b;
}

.schedule-choice-group .shift-btn:hover,
.schedule-choice-group .branch-btn:hover {
  filter: brightness(1.06);
}

.schedule-choice-group .shift-btn.active,
.schedule-choice-group .branch-btn.active {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 10px 22px rgba(15, 23, 42, 0.16),
    0 0 0 4px rgba(37, 99, 235, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.schedule-editor-preview-box {
  border: 1px dashed #bfdbfe;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.schedule-editor-preview-box strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

.schedule-editor-preview-box.is-off {
  border-color: #fecaca;
  background: #fff5f5;
}

.schedule-editor-time-grid {
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.schedule-editor-time-grid label,
.schedule-editor-zone-select {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.schedule-editor-zone-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.schedule-editor-zone-select {
  flex: 1 1 280px;
}

.schedule-editor-zone-select select {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
}

.schedule-editor-submit {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.quick-area-modal-card {
  width: min(460px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #dbe5ef;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
  padding: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1200;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.quick-area-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.quick-area-modal-head h3 {
  margin: 0;
  color: #0f172a;
}

.quick-area-close {
  background: #f8fafc;
  color: #475569;
}

.quick-area-modal-body {
  margin-bottom: 16px;
}

.quick-area-modal-body input {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.quick-area-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

html.page-is-booting,
body.page-loading-active {
  overflow: hidden;
}

.page-loading-overlay {
  background: rgba(241, 245, 249, 0.82);
  backdrop-filter: blur(10px);
}

.page-loading-card {
  width: min(420px, calc(100vw - 32px));
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 24px;
  text-align: center;
}

.page-loading-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7cc 0%, #fff1b8 100%);
  color: #9a6700;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-loading-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 28px;
}

.page-loading-card p {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.page-loading-spinner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 4px solid #dbeafe;
  border-top-color: #2563eb;
  animation: page-loading-spin 0.85s linear infinite;
}

@keyframes page-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.notification-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.notification-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.notification-card-head span {
  font-size: 12px;
  color: #64748b;
}

.notification-card-body {
  color: #334155;
  line-height: 1.55;
}

.schedule-pending-flag {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #d97706;
}

.schedule-request-result {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
}

.schedule-request-result.success {
  color: #166534;
}

.schedule-request-result.error {
  color: #b91c1c;
}

.schedule-request-result.pending {
  color: #1d4ed8;
}

.schedule-register-hero {
  display: grid;
  gap: 18px;
}

.schedule-register-hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.schedule-register-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.schedule-register-stat,
.schedule-register-profile-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.schedule-register-stat span,
.schedule-register-profile-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schedule-register-stat strong,
.schedule-register-profile-card strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.35;
}

.schedule-register-profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.schedule-register-workspace {
  display: grid;
  gap: 18px;
}

.schedule-register-section-card {
  display: grid;
  gap: 16px;
}

.schedule-register-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.schedule-register-section-head h3 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 22px;
}

.schedule-register-section-head p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.schedule-register-section-count {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.schedule-register-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.schedule-register-day-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 58%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  animation: scheduleRegisterCardIn 0.28s ease both;
  animation-delay: calc(var(--schedule-card-index, 0) * 40ms);
  overflow: hidden;
}

@keyframes scheduleRegisterCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule-register-day-card-adjustment {
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 34%),
    linear-gradient(180deg, #fffaf5 0%, #ffffff 58%);
}

.schedule-register-day-card-head,
.schedule-register-day-card-date,
.schedule-register-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.schedule-register-day-card-head {
  flex-wrap: wrap;
}

.schedule-register-day-card-date {
  justify-content: flex-start;
}

.schedule-register-day-card-dow {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}

.schedule-register-day-card-date strong {
  display: block;
  margin-bottom: 2px;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
}

.schedule-register-day-card-date span {
  color: #64748b;
  font-size: 13px;
}

.schedule-register-day-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  background: rgba(239, 246, 255, 0.92);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.schedule-register-day-card-adjustment .schedule-register-day-card-tag {
  border-color: rgba(249, 115, 22, 0.18);
  background: rgba(255, 237, 213, 0.92);
  color: #c2410c;
}

.schedule-register-day-card-grid,
.schedule-register-adjustment-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.schedule-register-day-card-grid-bottom {
  grid-template-columns: 1fr;
}

.schedule-register-day-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(219, 229, 239, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
}

.schedule-register-panel-head {
  display: grid;
  gap: 4px;
  justify-content: flex-start;
}

.schedule-register-panel-head h4 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.schedule-register-panel-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.schedule-register-table {
  min-width: 980px;
}

.schedule-register-table-wrap-compact {
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: #ffffff;
}

.schedule-custom-time-panel[hidden],
.schedule-register-muted[hidden] {
  display: none !important;
}

.schedule-register-table-compact {
  min-width: 100%;
}

.schedule-register-table-compact th,
.schedule-register-table-compact td {
  padding: 10px 12px;
  vertical-align: middle;
}

.schedule-register-row-compact td {
  background: #ffffff;
}

.schedule-register-table td {
  vertical-align: top;
}

.schedule-select-stack {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.schedule-select-stack-compact {
  min-width: 260px;
  max-width: 300px;
  gap: 8px;
}

.schedule-select-shell-compact {
  padding: 8px 10px 10px;
  border-radius: 14px;
  border-color: #cfe0f5;
  background: linear-gradient(180deg, #f6faff 0%, #ffffff 100%);
  box-shadow: none;
}

.schedule-select-shell-compact select {
  min-height: 38px;
  padding: 8px 34px 8px 12px;
  font-size: 14px;
  font-weight: 600;
}

.schedule-shift-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.schedule-shift-option {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #dbe5ef;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.schedule-shift-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.schedule-shift-option span {
  font-size: 14px;
  font-weight: 800;
}

.schedule-shift-option small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.schedule-shift-option.is-active {
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.16);
}

.schedule-shift-option.is-active small {
  color: rgba(255, 255, 255, 0.86);
}

.schedule-shift-option.tone-morning.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
}

.schedule-shift-option.tone-evening.is-active {
  background: linear-gradient(135deg, #ea580c 0%, #fb923c 100%);
}

.schedule-shift-option.tone-full.is-active {
  background: linear-gradient(135deg, #16a34a 0%, #4ade80 100%);
}

.schedule-shift-option.tone-custom.is-active {
  background: linear-gradient(135deg, #334155 0%, #64748b 100%);
}

.schedule-shift-option.tone-off.is-active {
  background: linear-gradient(135deg, #e11d48 0%, #fb7185 100%);
}

.schedule-shift-option:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
}

.schedule-select-shell {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.schedule-select-shell::after {
  content: "▾";
  position: absolute;
  right: 14px;
  bottom: 15px;
  color: #64748b;
  pointer-events: none;
  font-size: 12px;
}

.schedule-select-caption {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.schedule-select-shell select {
  width: 100%;
  min-height: 42px;
  padding: 8px 30px 8px 10px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  appearance: none;
}

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

.schedule-custom-time-panel {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px dashed #bfdbfe;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.84) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.schedule-custom-time-panel-compact {
  margin-top: 2px;
  padding: 8px 10px;
  border-radius: 14px;
  border-style: solid;
  border-color: #dbeafe;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.schedule-custom-time-grid label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.schedule-custom-time-grid input {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.schedule-custom-time-grid-compact {
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 8px;
}

.schedule-custom-time-grid-compact label {
  font-size: 11px;
}

.schedule-custom-time-grid-compact input {
  min-height: 36px;
  padding: 6px 8px;
}

.schedule-custom-time-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.schedule-row-preview {
  min-width: 0;
}

.schedule-row-preview-compact .schedule-shift-preview {
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  box-shadow: none;
}

.schedule-row-preview-compact .schedule-shift-badge,
.schedule-row-preview-compact .schedule-branch-chip {
  padding: 4px 8px;
  font-size: 11px;
}

.schedule-row-preview-compact .schedule-shift-preview-detail,
.schedule-row-preview-compact .schedule-shift-preview-zone {
  font-size: 11px;
}

.schedule-shift-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #dbe5ef;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.schedule-shift-preview.is-placeholder {
  justify-items: center;
  align-content: center;
  min-height: 104px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-style: dashed;
}

.schedule-shift-preview.is-placeholder .schedule-shift-preview-top {
  justify-content: center;
}

.schedule-shift-preview.is-placeholder .schedule-shift-badge {
  background: #e2e8f0;
  color: #475569;
  min-width: 42px;
}

.schedule-shift-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-shift-badge,
.schedule-branch-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.schedule-shift-badge {
  color: #ffffff;
}

.schedule-branch-chip {
  background: #e2e8f0;
  color: #334155;
}

.schedule-shift-preview-detail,
.schedule-shift-preview-zone {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.schedule-shift-preview.tone-morning .schedule-shift-badge {
  background: #2563eb;
}

.schedule-shift-preview.tone-evening .schedule-shift-badge {
  background: #ea580c;
}

.schedule-shift-preview.tone-full .schedule-shift-badge {
  background: #16a34a;
}

.schedule-shift-preview.tone-custom .schedule-shift-badge {
  background: #475569;
}

.schedule-shift-preview.tone-off .schedule-shift-badge {
  background: #e11d48;
}

.schedule-shift-preview.branch-tp {
  border-color: rgba(22, 163, 74, 0.28);
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.schedule-shift-preview.branch-gv {
  border-color: rgba(234, 88, 12, 0.28);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.schedule-shift-preview.branch-q12 {
  border-color: rgba(139, 92, 246, 0.28);
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.schedule-shift-preview.branch-tp .schedule-branch-chip {
  background: #dcfce7;
  color: #166534;
}

.schedule-shift-preview.branch-gv .schedule-branch-chip {
  background: #ffedd5;
  color: #c2410c;
}

.schedule-shift-preview.branch-q12 .schedule-branch-chip {
  background: #f3e8ff;
  color: #7c3aed;
}

.schedule-register-date-cell {
  min-width: 118px;
}

.schedule-register-date-cell-compact {
  min-width: 82px;
  text-align: center;
}

.schedule-register-date-cell-compact strong {
  font-size: 24px;
  line-height: 1;
}

.schedule-register-date-cell-compact span {
  font-size: 14px;
}

.schedule-register-date-cell strong {
  display: block;
  color: #0f172a;
  font-size: 16px;
}

.schedule-register-date-cell span {
  color: #64748b;
  line-height: 1.45;
}

.schedule-request-state {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.schedule-register-day-panel-status .schedule-request-state {
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #dbe5ef;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.schedule-request-state strong {
  font-size: 13px;
}

.schedule-request-state span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.schedule-request-state-compact {
  min-width: 150px;
}

.schedule-register-table-new td:nth-child(2),
.schedule-register-table-adjustment td:nth-child(3) {
  min-width: 280px;
}

.schedule-register-table-adjustment td:nth-child(2) {
  min-width: 180px;
}

.schedule-request-state-pending strong {
  color: #1d4ed8;
}

.schedule-request-state-success strong {
  color: #166534;
}

.schedule-request-state-error strong {
  color: #b91c1c;
}

.schedule-request-state-neutral strong {
  color: #475569;
}

.register-reason {
  width: 100%;
  min-width: 0;
  min-height: 96px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  line-height: 1.55;
  resize: vertical;
}

.register-reason-compact {
  min-height: 62px;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.4;
}

.schedule-register-muted {
  display: inline-block;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
}

.register-reason:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.schedule-register-empty-state {
  padding: 16px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  line-height: 1.6;
}

.schedule-register-actions {
  margin-top: 6px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.profile-form-grid label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 600;
}

.profile-form-grid input {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.profile-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.profile-quick-actions-card {
  margin-top: 18px;
}

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

.profile-quick-action-form {
  margin: 0;
}

.profile-quick-action {
  width: 100%;
}

.profile-owner-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbe5ef;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.profile-owner-block-head {
  display: grid;
  gap: 6px;
}

.profile-owner-block-head h3 {
  color: #0f172a;
  font-size: 18px;
}

.profile-owner-block-head p {
  color: #64748b;
  line-height: 1.6;
}

.profile-form-grid-nested {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  margin: 0;
}

.shift-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.shift-pill {
  display: inline-flex;
  flex-direction: column;
  width: 100%;
  align-items: stretch;
  padding: 0;
  border-radius: 14px;
  color: #0f172a;
  font-size: 13px;
  text-transform: none;
  overflow: hidden;
}

.shift-pill .branch-tag {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.shift-pill .branch-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffffff;
  background: #64748b;
}

.branch-top {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  padding: 7px 10px;
  text-align: center;
}

.shift-bottom {
  background: #ffffff;
  padding: 10px 10px 12px;
  text-align: center;
}

.shift-bottom .schedule-mini-text {
  margin-top: 4px;
  line-height: 1.35;
}

body.schedule-hide-branch-labels .branch-top {
  display: none;
}

body.schedule-hide-branch-labels .shift-bottom {
  padding-top: 14px;
}

.shift-name {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.shift-name.morning {
  color: blue;
}
.shift-name.evening {
  color: orange;
}
.shift-name.full {
  color: green;
}
.shift-name.custom {
  color: #334155;
  font-size: 14px;
}
.shift-name.off {
  color: red;
}

.branch-top.tp {
  background: #16a34a;
}

.branch-top.gv {
  background: #ea580c;
}

.branch-top.q12 {
  background: #8b5cf6;
}

.branch-badge.tp,
.branch-tab-btn[data-branch="1"].active,
.branch-section-heading.tp {
  background: #16a34a;
  border-color: #16a34a;
}

.branch-badge.gv,
.branch-tab-btn[data-branch="2"].active,
.branch-section-heading.gv {
  background: #ea580c;
  border-color: #ea580c;
}

.branch-badge.q12,
.branch-tab-btn[data-branch="3"].active,
.branch-section-heading.q12 {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

.shift-box.morning,
.shift-box.evening,
.shift-box.full,
.shift-box.off {
  background: #ffffff;
  color: #111;
}

.branch-tag.tp {
  color: #15803d;
}
.branch-tag.gv {
  color: #a16207;
}
.branch-tag.q12 {
  color: #6d28d9;
}

.branch-heading.tp {
  border-color: #22c55e;
}
.branch-heading.gv {
  border-color: #eab308;
}
.branch-heading.q12 {
  border-color: #a855f7;
}

.branch-heading {
  border-left: 4px solid transparent;
  padding-left: 12px;
  margin-bottom: 12px;
}

/* BUTTON */
button {
  padding: 8px 14px;
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  background: #1d4ed8;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 4px;
  border: none;
  background: transparent;
  color: #374151;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s;
}

.mobile-menu-toggle:hover {
  background: #f1f5f9;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 2px 0;
  transition: 0.2s;
  border-radius: 1px;
}

/* INPUT */
input,
select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* FLEX */
.flex {
  display: flex;
  gap: 10px;
}

/* SCROLL */
.scroll {
  overflow-x: auto;
}

/* STICKY */
.sticky {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
}

/* BRANCH OVERVIEW */
.branch-overview {
  margin-top: 24px;
}

.branch-overview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 16px 0;
}

.branch-overview-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}
.branch-overview-scroll {
  overflow-x: auto;
  padding-bottom: 6px;
}

.branch-overview-grid {
  display: grid;
  gap: 16px;
  align-items: start;
  min-width: max-content;
}

.branch-overview-card {
  flex: 0 0 360px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.branch-overview-card.tp {
  border-top: 5px solid #16a34a;
}

.branch-overview-card.gv {
  border-top: 5px solid #ea580c;
}

.branch-overview-card.q12 {
  border-top: 5px solid #8b5cf6;
}

.branch-overview-card-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.branch-overview-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.branch-overview-name {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.branch-overview-days {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
}

.branch-overview-day {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 14px;
}

.branch-overview-day-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.branch-overview-weekday {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.branch-overview-date {
  font-size: 13px;
  color: #64748b;
}

.branch-shift-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.branch-shift-block {
  border-radius: 12px;
  padding: 12px;
}

.branch-shift-block.morning {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.branch-shift-block.evening {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.branch-shift-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.branch-shift-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
}

.branch-shift-tag.morning {
  background: #2563eb;
}

.branch-shift-tag.evening {
  background: #ea580c;
}

.branch-shift-count {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
  min-width: 24px;
  text-align: right;
}

.branch-shift-state-row {
  min-height: 22px;
  margin-bottom: 6px;
}

.branch-shift-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.branch-shift-alert.empty {
  background: #fee2e2;
  color: #b91c1c;
}

.branch-shift-alert.low {
  background: #fef3c7;
  color: #b45309;
}

.branch-shift-names {
  min-height: 38px;
  color: #334155;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 500;
}

.branch-area-list {
  display: grid;
  gap: 8px;
}

.branch-area-line {
  display: grid;
  gap: 4px;
}

.branch-area-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.branch-area-members {
  color: #1e293b;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.branch-overview-empty {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}

.branch-area-cards {
  display: grid;
  gap: 12px;
}

.branch-area-card {
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
}

.branch-area-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.branch-area-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.branch-area-card-count {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.branch-area-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.branch-area-card-metrics span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
  font-weight: 600;
}

/* PROFESSIONAL REFRESH */
.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 229, 239, 0.9);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #334155 0%, #1f2937 100%);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

input,
select,
textarea {
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
}

input,
select {
  padding: 10px 12px;
}

textarea {
  padding: 12px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.table-responsive {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.table {
  background: transparent;
}

.table thead th {
  font-weight: 700;
  color: #334155;
}

.table tbody td {
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.table tbody tr:hover {
  background: #eff6ff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.branch-section-heading {
  font-size: 16px;
  font-weight: 700;
  padding-left: 12px;
  border-left: 4px solid #64748b;
}

.branch-section-heading.tp {
  border-color: #0f766e;
}

.branch-section-heading.gv {
  border-color: #9333ea;
}

.branch-section-heading.q12 {
  border-color: #ec4899;
}

/* CARD HEADER */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.card-actions {
  display: flex;
  gap: 12px;
}

/* BUTTONS */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #6b7280;
  color: #fff;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-outline {
  background: transparent;
  border: 3px solid #020a15;
  color: #374151;
}

.shift-btn.evening.active,
.shift-btn.full.active,
.shift-btn.off.active,
.shift-btn.morning.active,
.branch-btn.tp.active,
.branch-btn.gv.active,
.branch-btn.q12.active {
  border: 2px solid #484848 !important;
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

/* TABLE RESPONSIVE */
.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.column-visibility-toolbar {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.employees-toolbar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.employees-toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.employees-filter-group {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
}

.employees-filter-field {
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.employees-search-field {
  min-width: 240px;
}

.employees-filter-field span {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.employees-filter-select {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.employees-filter-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

.employees-search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

.column-visibility-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.column-visibility-button::before {
  content: "☷";
  font-size: 14px;
  line-height: 1;
}

.column-visibility-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: min(440px, calc(100vw - 40px));
  max-height: min(60vh, 420px);
  overflow: auto;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #dbe5ef;
  background: #fff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  z-index: 90;
}

.column-visibility-panel[hidden] {
  display: none !important;
}

.column-visibility-panel h4 {
  margin: 0 0 6px;
  color: #0f172a;
}

.column-visibility-panel p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
}

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

.column-visibility-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 600;
}

.column-visibility-item input {
  width: 16px;
  height: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table thead th {
  background: #f8fafc;
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
}

.table tbody td {
  padding: 5px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table tbody tr:hover {
  background: #f8fafc;
}

/* EMPLOYEE INFO */
.employee-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.employee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.employee-details {
  display: flex;
  flex-direction: column;
}

.employee-name {
  font-weight: 600;
  color: #1e293b;
}

.employee-id {
  font-size: 12px;
  color: #6b7280;
}

/* SALARY AMOUNTS */
.salary-amount {
  font-weight: 600;
  color: #374151;
}

.total-amount {
  color: #059669;
  font-size: 16px;
}

/* STATUS BADGES */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.status-paid {
  background: #dcfce7;
  color: #166534;
}

.status-pending {
  background: #fef3c7;
  color: #92400e;
}

.status-present {
  background: #dcfce7;
  color: #166534;
}

.status-absent {
  background: #fee2e2;
  color: #991b1b;
}

.status-ok {
  background: #dcfce7;
  color: #166534;
}

.status-late {
  background: #fef3c7;
  color: #92400e;
}

.status-missing-checkout,
.status-missing-checkin,
.status-early-leave {
  background: #fee2e2;
  color: #991b1b;
}

.status-unscheduled {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-no-punch {
  background: #f3f4f6;
  color: #374151;
}

.status-off {
  background: #e0e7ff;
  color: #3730a3;
}

/* TIME CELLS */
.time-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.time-icon {
  color: #6b7280;
}

/* HOURS BADGE */
.hours-badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

@media (max-width: 980px) {
  .schedule-register-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .schedule-register-card-grid,
  .schedule-register-overview {
    grid-template-columns: 1fr;
  }

  .schedule-shift-option-grid,
  .schedule-custom-time-grid {
    grid-template-columns: 1fr;
  }

  .schedule-register-day-card {
    padding: 14px;
    border-radius: 18px;
  }

  .schedule-register-day-card-date strong {
    font-size: 20px;
  }
}

@media (max-width: 1100px) {
  .branch-admin-grid,
  .schedule-editor-day-card,
  .profile-form-grid,
  .profile-form-grid-nested,
  .profile-quick-actions {
    grid-template-columns: 1fr;
  }

  .schedule-editor-zone-row {
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-editor-zone-select,
  .schedule-editor-zone-row .btn {
    width: 100%;
  }

  .schedule-toolbar,
  .schedule-toolbar-right,
  .schedule-summary-toolbar,
  .support-mailbox-head,
  .page-section-header,
  .branch-overview-header,
  .card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .schedule-stats-grid-global,
  .schedule-stats-grid {
    min-width: 0;
    width: 100%;
  }

  .employees-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .employees-toolbar-actions,
  .employees-filter-group,
  .card-actions {
    width: 100%;
  }

  .column-visibility-toolbar {
    width: 100%;
  }

  .column-visibility-button {
    width: 100%;
    justify-content: center;
  }

  .table-responsive,
  .scroll,
  .branch-overview-scroll {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 780px) {
  .card,
  .schedule-editor-shell,
  .branch-admin-shell,
  .schedule-area-panel,
  .quick-area-modal-card {
    padding: 16px;
  }

  .card-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .card-title,
  .page-section-title,
  .branch-overview-title,
  .schedule-editor-day-label {
    font-size: 20px;
  }

  .schedule-editor-header,
  .schedule-editor-title-group {
    gap: 12px;
  }

  .schedule-editor-current-box,
  .schedule-editor-preview-box {
    min-height: 0;
  }

  .schedule-editor-time-grid,
  .column-visibility-grid {
    grid-template-columns: 1fr;
  }

  .branch-overview-grid {
    min-width: 0;
  }

  .branch-overview-card {
    width: 100%;
    min-width: 0;
  }

  .branch-overview-days {
    display: grid;
    grid-template-columns: 1fr;
  }

  .branch-overview-day,
  .branch-area-card,
  .schedule-off-cell {
    padding: 12px;
  }

  .schedule-submit,
  .schedule-editor-submit {
    justify-content: stretch;
  }

  .schedule-editor-submit button,
  .schedule-submit button {
    width: 100%;
  }

  .sticky {
    max-width: 180px;
  }
}

@media (max-width: 640px) {
  .table thead th,
  .table tbody td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .legend,
  .week-controls,
  .employees-filter-group,
  .card-actions,
  .support-contact-feature-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .legend-item,
  .week-controls a,
  .week-controls button,
  .employees-filter-field,
  .support-contact-feature-actions .btn,
  .support-contact-feature-actions a {
    width: 100%;
  }

  .schedule-filter-label {
    min-width: 0;
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .schedule-filter-label > div,
  .schedule-filter-label select,
  .area-inline-form select,
  .area-inline-form input,
  .area-row-form select,
  .area-row-form input,
  .area-create-button,
  .area-branch-create-form,
  .area-row,
  .branch-admin-item-body,
  .quick-area-modal-actions .btn,
  .quick-area-modal-actions button {
    width: 100%;
  }

  .area-branch-create-form,
  .area-row,
  .branch-admin-item-body {
    grid-template-columns: 1fr;
  }

  .area-row-form {
    flex-wrap: wrap;
  }

  .area-delete-form,
  .quick-area-modal-actions {
    width: 100%;
  }

  .quick-area-modal-actions {
    flex-direction: column-reverse;
  }

  .column-visibility-panel {
    right: auto;
    left: 0;
    min-width: 0;
    width: 100%;
  }
}

