:root {
  --bg: #f4f0e8;
  --panel: rgba(255, 252, 248, 0.96);
  --ink: #241a14;
  --muted: #74675c;
  --accent: #b24e1f;
  --accent-dark: #7d3312;
  --line: rgba(36, 26, 20, 0.12);
  --success: #2d7d46;
  --shadow: 0 18px 42px rgba(63, 36, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(178, 78, 31, 0.18), transparent 28%),
    linear-gradient(180deg, #fff8f0 0%, var(--bg) 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
}

.brand-logo {
  width: min(280px, 58vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 18px rgba(36, 26, 20, 0.08));
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--accent-dark);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
  margin-bottom: 10px;
}

.intro {
  max-width: 62ch;
  color: var(--muted);
}

.hero-card,
.panel,
.subpanel,
.stat-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 8px rgba(45, 125, 70, 0.14);
}

.tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.subtab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab-btn,
.subtab-btn,
.primary-btn,
.ghost-btn,
.inline-btn {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.tab-btn {
  padding: 12px 18px;
  background: rgba(178, 78, 31, 0.08);
  color: var(--accent-dark);
}

.subtab-btn {
  padding: 10px 16px;
  background: rgba(36, 26, 20, 0.08);
  color: var(--ink);
}

.tab-btn.active,
.subtab-btn.active,
.primary-btn {
  background: var(--accent);
  color: #fff9f4;
}

.primary-btn,
.ghost-btn {
  padding: 12px 18px;
}

.ghost-btn,
.inline-btn {
  background: rgba(36, 26, 20, 0.08);
  color: var(--ink);
}

.tab-btn:hover,
.primary-btn:hover,
.ghost-btn:hover,
.inline-btn:hover {
  transform: translateY(-1px);
}

.layout {
  display: block;
}

.panel {
  padding: 22px;
}

.tablet-shell {
  width: min(1100px, 100%);
  margin: 0 auto 6px;
}

.tablet-heading {
  text-align: center;
  margin-bottom: 20px;
}

.tablet-heading-left {
  text-align: left;
  margin-bottom: 10px;
}

.tablet-heading .eyebrow {
  margin-bottom: 10px;
}

.tablet-heading h2 {
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  margin-bottom: 0;
}

.tablet-form {
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 249, 242, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.punch-hero {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(320px, 1fr);
  gap: 22px;
  align-items: center;
}

.punch-logo-block {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.punch-logo {
  width: min(100%, 340px);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 10px 18px rgba(36, 26, 20, 0.08));
}

.punch-date-time {
  text-align: center;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.98rem;
}

.pin-entry span {
  font-size: 0.95rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.pin-entry input {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: 0.24em;
  padding: 18px 20px;
  border-radius: 18px;
}

.identity-card {
  margin-bottom: 14px;
  text-align: center;
  font-weight: 700;
}

.quick-actions {
  margin-bottom: 14px;
  justify-content: center;
}

.tablet-submit {
  width: 100%;
  padding: 14px 18px;
  font-size: 1.05rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tablet-tab-panel {
  display: none;
}

.tablet-tab-panel.active {
  display: block;
}

.manager-tab-panel {
  display: none;
}

.manager-tab-panel.active {
  display: block;
}

.employee-tab-panel {
  display: none;
}

.employee-tab-panel.active {
  display: block;
}

.stack {
  display: grid;
  gap: 14px;
}

.compact {
  gap: 10px;
}

label {
  display: grid;
  gap: 8px;
}

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

.check-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  padding: 10px 12px;
}

.check-pill input {
  width: auto;
  margin: 0;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(178, 78, 31, 0.18);
  border-color: var(--accent);
}

.message-box {
  min-height: 24px;
  margin-top: 14px;
  color: var(--accent-dark);
}

.muted-text {
  color: var(--muted);
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 20px;
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.stat-card strong {
  font-size: 1.8rem;
}

.manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.manager-grid-single {
  grid-template-columns: 1fr;
}

.subpanel {
  padding: 18px;
  margin-bottom: 18px;
}

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

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

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

.list-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.list-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.compact-card {
  padding: 12px 14px;
}

.schedule-sheet {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 18px;
}

.schedule-heading {
  text-align: center;
  margin-bottom: 12px;
}

.schedule-heading h2 {
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.schedule-heading p {
  color: var(--ink);
  font-weight: 700;
}

.schedule-note {
  margin-bottom: 14px;
  color: var(--muted);
  text-align: center;
}

.schedule-publish-status {
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
  color: var(--accent-dark);
}

.schedule-publish-status.schedule-published {
  color: var(--success);
}

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

.schedule-role-block {
  border: 1px solid rgba(36, 26, 20, 0.3);
}

.schedule-role-title {
  padding: 8px 10px;
  font-weight: 700;
  background: #f4f4f4;
  border-bottom: 1px solid rgba(36, 26, 20, 0.3);
}

.schedule-table {
  font-size: 0.92rem;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid rgba(36, 26, 20, 0.3);
  padding: 6px 4px;
  text-align: center;
}

.schedule-name-head,
.schedule-name-cell {
  text-align: left !important;
  min-width: 140px;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 1;
}

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

.schedule-order-actions {
  display: inline-flex;
  gap: 4px;
}

.schedule-order-btn {
  border: 1px solid rgba(36, 26, 20, 0.18);
  background: #fff8f2;
  color: var(--accent-dark);
  border-radius: 8px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
}

.schedule-order-btn:hover {
  background: #f4e0d3;
}

.schedule-day-head {
  background: #fafafa;
}

.schedule-day-head span,
.schedule-day-head strong {
  display: block;
}

.schedule-period-head {
  background: #efefef;
  min-width: 58px;
}

.schedule-cell {
  min-width: 58px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.schedule-cell:hover {
  background: #fef0e7;
}

.schedule-cell-pm {
  background: #e1e1e1;
}

.schedule-cell-pm:hover {
  background: #f5d8c8;
}

.schedule-cell-off {
  background: #fff25f !important;
}

.schedule-row-alt .schedule-name-cell {
  background: #fafafa;
}

.schedule-empty-row {
  text-align: center !important;
  color: var(--muted);
}

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

.timesheet-groups {
  display: grid;
  gap: 18px;
}

.timesheet-group {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(36, 26, 20, 0.06);
}

.timesheet-group-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.95), rgba(246, 239, 232, 0.9));
  border-bottom: 1px solid var(--line);
}

.timesheet-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.timesheet-person p {
  margin: 4px 0 0;
  color: var(--muted);
}

.timesheet-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(178, 78, 31, 0.12);
  color: var(--accent-dark);
  font-weight: 700;
}

.timesheet-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 16px;
  min-width: min(100%, 420px);
}

.timesheet-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.timesheet-summary-grid strong {
  font-size: 1.25rem;
}

.timesheet-rows {
  padding: 10px 0;
}

.timesheet-row {
  display: grid;
  grid-template-columns: 1.2fr 1.1fr 1.5fr 0.8fr 1fr 1fr;
  gap: 16px;
  padding: 13px 20px;
  align-items: center;
  border-top: 1px solid rgba(36, 26, 20, 0.08);
}

.timesheet-row-head {
  border-top: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(36, 26, 20, 0.03);
}

.timesheet-empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero,
  .manager-grid,
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tab-bar {
    flex-wrap: wrap;
  }

  .hero-card {
    width: 100%;
    justify-content: center;
  }

  .role-check-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .punch-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .punch-logo {
    width: min(72vw, 280px);
  }

  .tablet-heading-left {
    text-align: center;
  }

  .timesheet-group-head,
  .timesheet-row {
    grid-template-columns: 1fr;
  }

  .timesheet-group-head {
    display: grid;
  }

  .timesheet-summary-grid {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .timesheet-row {
    gap: 6px;
  }

  .timesheet-row span::before {
    content: "";
  }
}
