:root {
  --dark: #411912;
  --dark2: #260c08;
  --brown: #5A3328;
  --tan: #A3806A;
  --cream: #D1AF92;
  --paper: #F8F0E7;
  --paper2: #EFE0D0;
  --line: #E1C9B4;
  --white: #FFFDF9;
  --danger: #8a1f16;
  --green: #3e5a32;
  --amber: #a6601c;
  --shadow: rgba(44, 15, 10, 0.15);
  --shadow-strong: rgba(44, 15, 10, 0.25);
}

* { box-sizing: border-box; }
html { background: #efe2d4; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 3%, rgba(65,25,18,.18), transparent 22%),
    radial-gradient(circle at 95% 8%, rgba(163,128,106,.23), transparent 27%),
    linear-gradient(135deg, #fffaf4 0%, #f1e4d6 52%, #e1cbb7 100%);
  color: var(--dark);
}

button, input, select { font: inherit; }
button { cursor: pointer; border: 0; }
.hidden { display: none !important; }
h1, h2, p { margin-top: 0; }

/* LOGIN */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(209,175,146,.28), transparent 30%),
    linear-gradient(135deg, var(--dark2), var(--dark) 55%, #795341);
}
.login-card, .card, .hero-card {
  background: rgba(255, 253, 249, .9);
  border: 1px solid rgba(225, 201, 180, .9);
  border-radius: 30px;
  box-shadow: 0 22px 60px var(--shadow);
  backdrop-filter: blur(10px);
}
.login-card { width: min(440px, 100%); padding: 30px; }
.logo-wrap { text-align: center; margin-bottom: 24px; }
.logo { width: 132px; height: 132px; object-fit: contain; border-radius: 999px; filter: drop-shadow(0 12px 18px rgba(0,0,0,0.26)); }
.logo.small { width: 58px; height: 58px; }
h1 { margin-bottom: 4px; font-size: 30px; letter-spacing: -0.035em; }
.subtitle { color: var(--brown); margin-bottom: 0; }

/* FORMS */
.form { display: grid; gap: 14px; }
.label { display: grid; gap: 7px; font-weight: 850; font-size: 13px; color: var(--brown); letter-spacing: .01em; }
.input {
  width: 100%;
  border: 1px solid #d2b79d;
  background: #fffdf9;
  border-radius: 15px;
  padding: 12px 13px;
  color: var(--dark);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 1px 0 rgba(65,25,18,.04);
}
.input:focus { border-color: var(--dark); box-shadow: 0 0 0 4px rgba(65, 25, 18, .12); }
.input:disabled { background: #f3e9df; color: #6b5248; opacity: .98; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 950;
  background: linear-gradient(180deg, #66291e, var(--dark));
  color: #f8e4cf;
  box-shadow: 0 10px 20px rgba(65,25,18,.2);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(65,25,18,.26); }
.btn.secondary { background: rgba(255,253,249,.74); color: var(--dark); border: 1px solid var(--tan); box-shadow: none; }
.btn.secondary:hover { background: #fffdf9; }
.btn.light { background: #f3e6d8; color: var(--dark); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: linear-gradient(180deg, #a2261a, var(--danger)); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.demo-box, .notice { margin-top: 18px; border-radius: 18px; padding: 14px; background: #ead7c4; color: var(--brown); font-size: 14px; border: 1px solid #dfc7b0; }
.notice.success { background: #edf1e7; color: var(--green); border-color: #cbd8c0; }
.error { color: var(--danger); font-weight: 850; min-height: 20px; }

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 249, .83);
  border-bottom: 1px solid rgba(163,128,106,.28);
  backdrop-filter: blur(18px);
}
.header-inner { max-width: 1240px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand h1 { font-size: 19px; margin: 0; color: var(--dark); }
.brand p { font-size: 12px; color: var(--brown); margin: 0; }

.container { max-width: 1240px; margin: 0 auto; padding: 26px 18px 42px; }

/* HERO */
.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  margin-bottom: 18px;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(135deg, rgba(65,25,18,.96), rgba(90,51,40,.92)),
    radial-gradient(circle at 95% 20%, rgba(209,175,146,.45), transparent 32%);
  color: #ffe7d1;
  border-color: rgba(65,25,18,.22);
}
.hero-card::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: -54px;
  bottom: -108px;
  border-radius: 999px;
  border: 1px solid rgba(255,231,209,.32);
  background: rgba(255,231,209,.07);
}
.hero-card > * { position: relative; z-index: 1; }
.eyebrow { margin-bottom: 7px; color: #a66c43; font-size: 12px; font-weight: 950; text-transform: uppercase; letter-spacing: .1em; }
.hero-card .eyebrow { color: var(--cream); }
.hero-card h2 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.06em; }
.hero-text { margin: 0; color: rgba(255,231,209,.82); font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; min-width: min(100%, 500px); }
.hero-actions .btn.secondary { background: rgba(255,250,244,.13); color: #ffe7d1; border-color: rgba(255,231,209,.4); }
.hero-actions .btn.light { background: rgba(255,231,209,.9); color: var(--dark); }

/* DASHBOARD CARDS */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.card { padding: 20px; }
.stat-card {
  min-height: 104px;
  position: relative;
  overflow: hidden;
  border-left: 7px solid var(--dark);
  background: rgba(255, 253, 249, .86);
}
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -34px -42px auto;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(209,175,146,.18);
}
.stat-label { color: var(--brown); font-size: 13px; margin-bottom: 8px; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; }
.stat-value { font-weight: 950; font-size: 28px; margin: 0; letter-spacing: -.04em; }
.tabs { display: flex; gap: 10px; margin-bottom: 18px; }

/* LAYOUT */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 18px; align-items: start; }
.table-card { overflow: hidden; padding: 0; background: rgba(255,253,249,.78); }
.card-head { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,253,249,.97), rgba(247,239,229,.9)); display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.card-head.simple { margin: -20px -20px 18px; border-radius: 30px 30px 0 0; }
.card-head h2 { margin-bottom: 6px; font-size: 25px; letter-spacing: -.04em; }
.card-head p { margin: 0; color: var(--brown); font-size: 14px; }
.legend { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--brown); font-weight: 850; font-size: 13px; }
.today-dot { width: 13px; height: 13px; border-radius: 999px; background: var(--amber); box-shadow: 0 0 0 5px rgba(166,96,28,.13); }
.table-wrap { overflow-x: auto; }

/* TABLE */
table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; font-size: 14px; }
th { background: linear-gradient(180deg, #522018, var(--dark)); color: #f9dfc6; text-align: left; padding: 14px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; position: sticky; top: 0; }
td { padding: 15px 16px; border-bottom: 1px solid rgba(90,51,40,.13); vertical-align: middle; }
tr.schedule-row { cursor: pointer; transition: background .12s ease, box-shadow .12s ease, transform .12s ease; }
tr.schedule-row:nth-child(even) { background: rgba(239, 224, 208, .36); }
tr.schedule-row:hover { background: #ead7c4; }
tr.schedule-row.active { background: #dec3aa; box-shadow: inset 6px 0 0 var(--dark); }
tr.schedule-row.today { background: #f3ddc2; box-shadow: inset 6px 0 0 var(--amber); }
tr.schedule-row.today.active { background: #e6c29c; box-shadow: inset 6px 0 0 var(--dark), inset 12px 0 0 var(--amber); }
.day-cell { font-weight: 950; color: var(--dark); min-width: 124px; }
.day-cell span:first-child { display: inline-block; margin-right: 7px; }
.date-cell { font-weight: 800; color: #6f4a3f; white-space: nowrap; }
.team-cell { font-weight: 800; color: #35130e; line-height: 1.42; }
.count-pill {
  display: inline-flex;
  min-width: 44px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 12px;
  background: #fff8ef;
  border: 1px solid #d8b99f;
  font-weight: 950;
  color: var(--dark);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.count-pill.empty { color: #8a766d; background: transparent; border-color: transparent; box-shadow: none; }
.note-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f7e1bd;
  border: 1px solid #e8c383;
  color: #5a3311;
  font-weight: 850;
  font-size: 13px;
}
.today-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--amber);
  color: #fff7ed;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .03em;
  vertical-align: middle;
}
.today-badge.big { margin-left: 8px; transform: translateY(-2px); }

/* SIDE PANEL */
.side-card { position: sticky; top: 94px; background: rgba(255,253,249,.92); border-top: 8px solid var(--dark); box-shadow: 0 26px 70px var(--shadow-strong); }
.side-card h2 { font-size: 25px; letter-spacing: -.04em; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-form { display: grid; gap: 14px; }
.day-preview { margin: 14px 0 16px; padding: 14px; border-radius: 18px; background: #f3e4d4; border: 1px solid var(--line); color: var(--dark); font-weight: 800; line-height: 1.35; }
.employee-card { overflow: hidden; }
.employee-form { margin-bottom: 18px; }
.employee-list { display: grid; gap: 10px; }
.employee-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: #fffdf9; border: 1px solid var(--line); border-radius: 18px; }
.employee-item p { margin: 0; }
.muted { color: var(--brown); font-size: 14px; }

.mobile-list { display: none; }
.mobile-row { display: none; }

@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .side-card { position: static; }
}

@media (max-width: 950px) {
  .stats { grid-template-columns: 1fr; }
  .hero-card { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 850px) {
  .container { padding: 18px 12px 34px; }
  .header-inner { align-items: center; }
  .brand h1 { font-size: 16px; }
  .logo.small { width: 48px; height: 48px; }
  table { display: none; }
  .table-card { background: transparent; border: 0; box-shadow: none; }
  .card-head { border-radius: 24px 24px 0 0; border: 1px solid var(--line); border-bottom: 0; align-items: flex-start; }
  .table-wrap { overflow: visible; }
  .mobile-list { display: grid; gap: 10px; }
  .mobile-row {
    display: grid;
    gap: 9px;
    padding: 15px;
    background: rgba(255,253,249,.92);
    border: 1px solid var(--line);
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(44,15,10,.08);
  }
  .mobile-row.active { background: #ead7c4; border-color: var(--tan); box-shadow: inset 5px 0 0 var(--dark), 0 8px 20px rgba(44,15,10,.08); }
  .mobile-row.today { background: #f3ddc2; border-color: #d9a36f; box-shadow: inset 5px 0 0 var(--amber), 0 8px 20px rgba(44,15,10,.08); }
  .mobile-row.today.active { box-shadow: inset 5px 0 0 var(--dark), inset 10px 0 0 var(--amber), 0 8px 20px rgba(44,15,10,.08); }
  .mobile-title { display: flex; justify-content: space-between; gap: 10px; font-weight: 950; }
  .mobile-title em { margin-left: 6px; padding: 3px 7px; border-radius: 999px; background: var(--amber); color: white; font-style: normal; font-size: 11px; }
  .mobile-team { font-weight: 800; }
  .mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; color: var(--brown); font-size: 14px; }
  .tabs { overflow-x: auto; }
}

@media (max-width: 560px) {
  .hero-card { padding: 20px; border-radius: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-card h2 { font-size: 30px; }
  .login-card { padding: 22px; }
  h1 { font-size: 26px; }
  .header-inner { padding: 9px 12px; }
  .brand { gap: 9px; }
  .btn { min-height: 40px; padding: 9px 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-head { display: block; }
  .legend { margin-top: 12px; }
}

/* v4 layout fixes */
.container.compact { max-width: 1180px; }
.hero-card.hero-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
  padding: 24px;
  border-left: 8px solid var(--dark);
}
.hero-card.hero-compact h2 { margin-bottom: 6px; }
.time-source { margin: 6px 0 0; color: #7b6257; font-size: 12px; font-weight: 750; }
.tabs { margin-top: 0; }
#content { margin-top: 0; }
@media (max-width: 950px) {
  .hero-card.hero-compact { align-items: flex-start; flex-direction: column; }
}

/* v5: cleaner 2-week view with modal editing */
.container.clean { max-width: 1320px; padding-top: 24px; }
.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 18px;
  padding: 24px;
  border-radius: 30px;
  color: #ffe7d1;
  background:
    radial-gradient(circle at 90% 20%, rgba(209,175,146,.30), transparent 28%),
    linear-gradient(135deg, #32110c 0%, #411912 52%, #6e4435 100%);
  border: 1px solid rgba(65,25,18,.25);
  box-shadow: 0 24px 70px rgba(44,15,10,.22);
}
.hero-panel h2 { margin: 0 0 6px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.065em; }
.hero-panel p { margin: 0 0 10px; color: rgba(255,231,209,.86); }
.hero-panel .eyebrow { color: var(--cream); }
.sync-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  color: #4b1b13;
  background: rgba(255,231,209,.88);
  font-size: 12px;
  font-weight: 900;
}
.schedule-card { padding: 0; overflow: hidden; background: rgba(255, 253, 249, .86); }
.schedule-head { border-bottom: 0; padding: 24px 26px 18px; }
.schedule-head h2 { font-size: 30px; }
.schedule-grid { width: 100%; padding: 0 16px 18px; }
.grid-header,
.schedule-item {
  display: grid;
  grid-template-columns: minmax(145px, .72fr) minmax(260px, 2fr) minmax(96px, .52fr) minmax(82px, .45fr) minmax(110px, .75fr);
  align-items: center;
  gap: 14px;
}
.grid-header {
  margin: 0 -16px;
  padding: 14px 26px;
  color: #f9dfc6;
  background: linear-gradient(180deg, #522018, var(--dark));
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.schedule-item {
  width: 100%;
  min-height: 72px;
  padding: 14px 10px;
  text-align: left;
  color: var(--dark);
  background: transparent;
  border-radius: 18px;
  border: 1px solid transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background .14s ease, transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.schedule-item:nth-child(odd) { background: rgba(239, 224, 208, .36); }
.schedule-item:hover { transform: translateY(-1px); background: #ead7c4; border-color: #d4b89f; box-shadow: 0 10px 24px rgba(44,15,10,.08); }
.schedule-item.today { background: linear-gradient(90deg, rgba(166,96,28,.16), rgba(255,253,249,.72)); border-color: rgba(166,96,28,.36); box-shadow: inset 6px 0 0 var(--amber); }
.date-block { display: grid; gap: 2px; }
.date-block strong { font-size: 15px; font-weight: 950; }
.date-block span { color: #6f4a3f; font-weight: 850; }
.date-block em { width: fit-content; margin-top: 4px; padding: 3px 8px; border-radius: 999px; color: #fff7ed; background: var(--amber); font-style: normal; font-size: 11px; font-weight: 950; }
.team-block { font-size: 15px; font-weight: 850; line-height: 1.35; overflow-wrap: anywhere; }
.note-block { overflow-wrap: anywhere; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(38, 12, 8, .56);
  backdrop-filter: blur(6px);
}
.modal-card {
  width: min(560px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  position: relative;
  padding: 26px;
  border-radius: 30px;
  background: #fffdf9;
  border: 1px solid rgba(225, 201, 180, .96);
  border-top: 8px solid var(--dark);
  box-shadow: 0 36px 100px rgba(20, 6, 4, .42);
}
.modal-card h2 { margin: 0 44px 6px 0; font-size: 28px; letter-spacing: -.045em; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--dark);
  background: #f3e4d4;
  border: 1px solid var(--line);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}
.modal-close:hover { background: #ead7c4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.side-card { display: none !important; }
.layout { display: block; }
.table-wrap { overflow: visible; }
@media (max-width: 940px) {
  .hero-panel { grid-template-columns: 1fr; align-items: start; }
  .hero-actions { justify-content: flex-start; min-width: 0; }
  .grid-header { display: none; }
  .schedule-grid { display: grid; gap: 10px; padding: 0 12px 14px; }
  .schedule-item {
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: unset;
    padding: 15px;
    background: rgba(255,253,249,.82);
    border-color: rgba(225,201,180,.88);
  }
  .schedule-item:nth-child(odd) { background: rgba(255,253,249,.82); }
  .date-block { grid-template-columns: 1fr auto; align-items: center; }
  .date-block em { grid-column: 1 / -1; }
  .team-block::before { content: 'Team: '; color: var(--brown); font-weight: 950; }
  .schedule-item > div:nth-child(3)::before { content: 'Halvpensjon: '; color: var(--brown); font-weight: 950; }
  .schedule-item > div:nth-child(4)::before { content: 'Spot: '; color: var(--brown); font-weight: 950; }
  .note-block::before { content: 'Note: '; color: var(--brown); font-weight: 950; }
}
@media (max-width: 560px) {
  .container.clean { padding: 14px 10px 28px; }
  .hero-panel { padding: 20px; border-radius: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .schedule-head { padding: 20px; }
  .modal-card { padding: 22px; border-radius: 24px; }
  .modal-actions { display: grid; grid-template-columns: 1fr; }
}


/* v6: no sideways scrolling, clearer 2-week layout */
html, body { max-width: 100%; overflow-x: hidden; }
.container.clean { max-width: 1180px; width: 100%; padding-left: 16px; padding-right: 16px; }
.hero-panel { grid-template-columns: 1fr; align-items: start; }
.hero-actions { justify-content: flex-start; min-width: 0; width: 100%; }
.hero-actions .btn { min-width: 170px; }
.schedule-card { width: 100%; }
.schedule-grid { width: 100%; padding: 0 14px 18px; overflow: visible; }
.grid-header,
.schedule-item {
  display: grid;
  grid-template-columns: minmax(120px, .82fr) minmax(0, 1.8fr) minmax(70px, .42fr) minmax(65px, .35fr) minmax(0, .9fr);
  gap: 10px;
  width: 100%;
}
.grid-header { margin: 0 -14px; padding: 13px 18px; }
.schedule-item { padding: 13px 8px; }
.team-block, .note-block { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
.date-block { min-width: 0; }
.count-pill { min-width: 38px; padding: 4px 10px; }
@media (max-width: 1050px) {
  .grid-header { display: none; }
  .schedule-grid { display: grid; gap: 10px; padding: 0 12px 14px; }
  .schedule-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 15px;
    background: rgba(255,253,249,.84);
    border-color: rgba(225,201,180,.88);
  }
  .schedule-item:nth-child(odd) { background: rgba(255,253,249,.84); }
  .date-block { grid-template-columns: 1fr auto; align-items: center; }
  .date-block em { grid-column: 1 / -1; }
  .team-block::before { content: 'Team: '; color: var(--brown); font-weight: 950; }
  .schedule-item > div:nth-child(3)::before { content: 'Halvpensjon: '; color: var(--brown); font-weight: 950; }
  .schedule-item > div:nth-child(4)::before { content: 'Spot: '; color: var(--brown); font-weight: 950; }
  .note-block::before { content: 'Note: '; color: var(--brown); font-weight: 950; }
}
@media (max-width: 680px) {
  .header-inner { align-items: flex-start; }
  .brand h1 { font-size: 17px; }
  .logo.small { width: 46px; height: 46px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; min-width: 0; }
}

/* v8: visual polish only — no week/navigation logic changed */
:root {
  --dark: #3b160f;
  --dark2: #210a07;
  --brown: #604238;
  --tan: #a98469;
  --cream: #e4c7aa;
  --paper: #fbf6ef;
  --paper2: #f1e5d8;
  --line: #ddc6b0;
  --white: #fffdfa;
  --shadow: rgba(45, 17, 11, 0.12);
  --shadow-strong: rgba(45, 17, 11, 0.22);
}

html { background: #f0e3d5; }
body {
  background:
    radial-gradient(circle at 15% 0%, rgba(209,175,146,.22), transparent 24%),
    radial-gradient(circle at 92% 10%, rgba(65,25,18,.13), transparent 22%),
    linear-gradient(180deg, #fffaf3 0%, #f3e7da 42%, #e7d4c2 100%);
}

.header {
  background: rgba(255, 253, 249, .92);
  box-shadow: 0 10px 30px rgba(45,17,11,.06);
}
.header-inner { max-width: 1280px; padding: 8px 22px; }
.logo.small { width: 54px; height: 54px; filter: drop-shadow(0 8px 12px rgba(45,17,11,.18)); }
.brand h1 { font-size: 20px; letter-spacing: -.035em; }
.brand p { color: #795b50; }

.container.clean {
  max-width: 1280px;
  padding-top: 22px;
}

.hero-panel {
  padding: 26px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% 22%, rgba(228,199,170,.24), transparent 28%),
    linear-gradient(135deg, #2b0e09 0%, #40170f 48%, #765143 100%);
  box-shadow: 0 26px 80px rgba(45,17,11,.20);
  position: relative;
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 231, 209, .12);
  border-radius: 26px;
  pointer-events: none;
}
.hero-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,231,209,.08);
  border: 1px solid rgba(255,231,209,.16);
}
.hero-copy, .hero-actions { position: relative; z-index: 1; }
.hero-panel .eyebrow { color: #e7c9aa; letter-spacing: .14em; }
.hero-panel h2 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  margin-bottom: 12px;
}
.hero-panel p { font-size: 16px; color: rgba(255,239,224,.88); }
.sync-pill {
  background: rgba(255, 250, 244, .94);
  color: #3b160f;
  border: 1px solid rgba(255,231,209,.65);
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
}
.hero-actions { gap: 12px; margin-top: 4px; }
.hero-actions .btn {
  min-width: 184px;
  min-height: 50px;
  border-radius: 16px;
}
.hero-actions .btn.secondary {
  background: rgba(255, 250, 244, .08);
  border-color: rgba(255,231,209,.45);
}
.hero-actions .btn.light {
  background: #fff0de;
  color: #3b160f;
  border: 1px solid rgba(255,231,209,.72);
}

.tabs {
  background: rgba(255,253,249,.58);
  border: 1px solid rgba(221,198,176,.75);
  border-radius: 18px;
  padding: 6px;
  width: fit-content;
  box-shadow: 0 8px 22px rgba(45,17,11,.05);
}
.tabs .btn { box-shadow: none; min-height: 42px; }
.tabs .btn.secondary { background: transparent; border-color: transparent; }

.card.schedule-card {
  background: rgba(255, 253, 249, .94);
  border: 1px solid rgba(221, 198, 176, .9);
  border-radius: 34px;
  box-shadow: 0 28px 90px rgba(45,17,11,.12);
}
.schedule-head {
  padding: 28px 30px 20px;
  background:
    linear-gradient(180deg, rgba(255,253,249,1), rgba(251,246,239,.92));
  border-bottom: 1px solid rgba(221,198,176,.85);
}
.schedule-head .eyebrow { color: #8c634f; }
.schedule-head h2 {
  font-size: 32px;
  color: #32110c;
  margin-bottom: 8px;
}
.schedule-head p {
  color: #6b4b40;
  max-width: 760px;
  line-height: 1.45;
}
.legend {
  background: #f7eadb;
  border: 1px solid #e5cdb6;
  border-radius: 999px;
  padding: 8px 12px;
}

.schedule-grid { padding: 0 18px 20px; }
.grid-header {
  margin: 0 -18px 12px;
  padding: 14px 26px;
  background: linear-gradient(180deg, #4d1c14, #35120d);
  color: #ffe4c8;
}
.schedule-item {
  min-height: 76px;
  margin-bottom: 8px;
  padding: 14px 14px;
  border-radius: 22px;
  background: #fffaf4;
  border: 1px solid rgba(221,198,176,.72);
  box-shadow: 0 6px 18px rgba(45,17,11,.045);
}
.schedule-item:nth-child(odd) { background: #f8efe5; }
.schedule-item:hover {
  background: #f1dfcd;
  border-color: #cda98d;
  box-shadow: 0 14px 32px rgba(45,17,11,.10);
}
.schedule-item.today {
  background: linear-gradient(90deg, rgba(166,96,28,.20), #fff8ef 55%);
  border-color: rgba(166,96,28,.55);
  box-shadow: inset 7px 0 0 var(--amber), 0 12px 28px rgba(166,96,28,.10);
}
.date-block strong { font-size: 16px; color: #2b0e09; }
.date-block span { font-size: 15px; color: #715247; }
.team-block { color: #2d100b; font-weight: 900; }
.count-pill {
  background: #fffdf9;
  border-color: #d0aa8c;
  box-shadow: 0 5px 12px rgba(45,17,11,.06);
}
.note-pill {
  background: #f5dfbd;
  border-color: #ddb26f;
}
.muted { color: #8a756b; }

.modal-card {
  border-radius: 34px;
  background: #fffdf9;
  box-shadow: 0 36px 110px rgba(20, 6, 4, .48);
}
.day-preview {
  background: linear-gradient(135deg, #f5e7d8, #fff9f1);
  border-color: #dec5ad;
}
.input {
  background: #fffaf4;
  border-color: #d6b99f;
}
.input:focus { box-shadow: 0 0 0 4px rgba(65,25,18,.10); }

@media (min-width: 1051px) {
  .grid-header,
  .schedule-item {
    grid-template-columns: minmax(130px,.7fr) minmax(0,2.2fr) minmax(96px,.45fr) minmax(80px,.35fr) minmax(0,.8fr);
  }
}

@media (max-width: 760px) {
  .header-inner { padding: 8px 12px; }
  .hero-panel { padding: 22px; border-radius: 28px; }
  .hero-panel h2 { font-size: 34px; }
  .hero-panel p { font-size: 14px; }
  .tabs { width: 100%; }
  .schedule-head { padding: 22px; }
  .schedule-head h2 { font-size: 28px; }
  .schedule-grid { padding: 0 12px 16px; }
  .schedule-item { border-radius: 20px; }
}

/* v9: visual-only update — more 3D and centered hero content/buttons. No app logic changed. */
body {
  background:
    radial-gradient(circle at 18% 4%, rgba(255,255,255,.55), transparent 18%),
    radial-gradient(circle at 8% 16%, rgba(65,25,18,.12), transparent 22%),
    radial-gradient(circle at 94% 9%, rgba(163,128,106,.18), transparent 25%),
    linear-gradient(180deg, #fffaf3 0%, #f2e5d8 48%, #dfc8b3 100%);
}

.header {
  box-shadow:
    0 1px 0 rgba(255,255,255,.75) inset,
    0 14px 34px rgba(45,17,11,.08);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  padding: 34px 34px 30px;
  border-radius: 36px;
  border: 1px solid rgba(255,231,209,.16);
  background:
    radial-gradient(circle at 50% -18%, rgba(255,231,209,.20), transparent 32%),
    radial-gradient(circle at 92% 14%, rgba(255,231,209,.16), transparent 26%),
    radial-gradient(circle at 10% 88%, rgba(20,6,4,.18), transparent 24%),
    linear-gradient(145deg, #250b07 0%, #42170f 46%, #7a5547 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -18px 35px rgba(22,6,4,.20),
    0 6px 0 rgba(45,17,11,.18),
    0 32px 80px rgba(45,17,11,.25);
}

.hero-panel::before {
  inset: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255,231,209,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.16);
}

.hero-panel::after {
  right: -62px;
  top: -72px;
  width: 250px;
  height: 250px;
  background:
    radial-gradient(circle at 36% 36%, rgba(255,255,255,.12), transparent 34%),
    rgba(255,231,209,.07);
  box-shadow: inset 0 0 38px rgba(255,255,255,.08);
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto;
}

.hero-panel .eyebrow {
  margin-bottom: 12px;
  color: #f3d3b4;
  text-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.hero-panel h2 {
  margin-bottom: 14px;
  text-shadow:
    0 2px 0 rgba(255,255,255,.05),
    0 7px 20px rgba(0,0,0,.25);
}

.hero-panel p {
  margin-left: auto;
  margin-right: auto;
  max-width: 720px;
}

.sync-pill {
  margin-top: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    0 9px 20px rgba(0,0,0,.14);
}

.hero-actions {
  width: 100%;
  max-width: 620px;
  justify-content: center;
  margin: 22px auto 0;
  gap: 14px;
}

.hero-actions .btn {
  min-width: 190px;
  min-height: 52px;
  border-radius: 17px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -3px 0 rgba(0,0,0,.18),
    0 12px 22px rgba(20,6,4,.18);
}

.hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.20),
    inset 0 -3px 0 rgba(0,0,0,.18),
    0 18px 30px rgba(20,6,4,.24);
}

.hero-actions .btn.secondary {
  background: linear-gradient(180deg, rgba(255,250,244,.16), rgba(255,250,244,.07));
  border-color: rgba(255,231,209,.46);
}

.hero-actions .btn.light {
  background: linear-gradient(180deg, #fff7ec, #efd8c2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -3px 0 rgba(91,48,35,.16),
    0 12px 22px rgba(20,6,4,.18);
}

.tabs {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 10px 24px rgba(45,17,11,.08);
}

.card.schedule-card {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 10px 0 rgba(45,17,11,.03),
    0 32px 88px rgba(45,17,11,.15);
}

.schedule-item {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    0 8px 18px rgba(45,17,11,.055);
}

.schedule-item:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 16px 34px rgba(45,17,11,.12);
}

.count-pill,
.note-pill {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.86),
    0 5px 12px rgba(45,17,11,.075);
}

@media (max-width: 760px) {
  .hero-panel {
    padding: 26px 18px 22px;
    border-radius: 28px;
  }
  .hero-actions {
    max-width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* v10: deeper 3D + warmer lively finish, visual only */
:root {
  --dark: #3a120d;
  --dark2: #1f0806;
  --brown: #67382b;
  --tan: #b98a63;
  --cream: #f0cda7;
  --paper: #fff4e8;
  --paper2: #f2dfca;
  --line: #d8b99a;
  --white: #fffdfa;
  --amber: #c47a27;
  --gold: #d6a34d;
  --wine: #6f2118;
  --shadow: rgba(50, 17, 12, 0.18);
  --shadow-strong: rgba(50, 17, 12, 0.36);
}

html {
  background: #e8d5c0;
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(214, 163, 77, .28), transparent 20%),
    radial-gradient(circle at 88% 10%, rgba(111, 33, 24, .18), transparent 24%),
    radial-gradient(circle at 50% 95%, rgba(185, 138, 99, .24), transparent 34%),
    linear-gradient(145deg, #fff7ec 0%, #f0dfcc 46%, #dbc0a5 100%);
  color: var(--dark);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(65,25,18,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65,25,18,.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
}

.header {
  background: rgba(255, 249, 241, .86);
  box-shadow:
    0 10px 34px rgba(50,17,12,.10),
    inset 0 -1px 0 rgba(255,255,255,.75);
}

.logo.small,
.logo {
  filter:
    drop-shadow(0 13px 12px rgba(30,8,5,.28))
    drop-shadow(0 2px 0 rgba(255,255,255,.20));
}

.container.clean {
  max-width: 1220px;
}

.hero-panel {
  position: relative;
  isolation: isolate;
  text-align: center;
  justify-items: center;
  overflow: hidden;
  padding: 34px 30px 30px;
  border-radius: 34px;
  border: 1px solid rgba(255, 232, 204, .20);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,232,204,.16), transparent 22%),
    radial-gradient(circle at 84% 12%, rgba(214,163,77,.21), transparent 24%),
    linear-gradient(145deg, #2b0b07 0%, #4b170f 48%, #855744 100%);
  box-shadow:
    0 34px 80px rgba(50,17,12,.34),
    0 10px 0 rgba(71,30,22,.10),
    inset 0 1px 0 rgba(255,242,225,.28),
    inset 0 -28px 60px rgba(20,5,3,.20);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 27px;
  border: 1px solid rgba(255,235,211,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  pointer-events: none;
  z-index: -1;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -110px;
  top: -150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,231,209,.22), rgba(255,231,209,.05) 52%, transparent 70%);
  border: 1px solid rgba(255,231,209,.18);
  box-shadow: inset 0 20px 40px rgba(255,255,255,.05);
  pointer-events: none;
}

.hero-copy {
  max-width: 780px;
}

.hero-panel .eyebrow {
  color: #ffd8ad;
  text-shadow: 0 2px 7px rgba(0,0,0,.24);
}

.hero-panel h2 {
  color: #fff2df;
  text-shadow:
    0 2px 0 rgba(78, 24, 16, .45),
    0 12px 24px rgba(20,5,3,.30);
}

.hero-panel p {
  color: rgba(255, 240, 222, .92);
  text-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.sync-pill {
  background: linear-gradient(180deg, #fff7ed, #f2cfaa);
  border: 1px solid rgba(255,255,255,.66);
  color: #4b160f;
  box-shadow:
    0 8px 18px rgba(35,9,6,.20),
    inset 0 1px 0 rgba(255,255,255,.85);
}

.hero-actions {
  justify-content: center !important;
  gap: 14px;
  margin-top: 6px;
}

.btn {
  border: 1px solid rgba(80,27,18,.22);
  background: linear-gradient(180deg, #8c3324 0%, #5a1c14 55%, #3a120d 100%);
  color: #fff0dd;
  box-shadow:
    0 12px 0 rgba(45,12,8,.16),
    0 20px 34px rgba(65,25,18,.24),
    inset 0 1px 0 rgba(255,238,220,.24),
    inset 0 -12px 20px rgba(30,7,5,.20);
  text-shadow: 0 1px 1px rgba(0,0,0,.28);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 0 rgba(45,12,8,.14),
    0 28px 44px rgba(65,25,18,.28),
    inset 0 1px 0 rgba(255,238,220,.28),
    inset 0 -12px 20px rgba(30,7,5,.18);
}

.btn:active {
  transform: translateY(1px);
  box-shadow:
    0 6px 0 rgba(45,12,8,.14),
    0 12px 20px rgba(65,25,18,.20),
    inset 0 2px 8px rgba(30,7,5,.24);
}

.btn.secondary {
  color: #fff2df;
  background: linear-gradient(180deg, rgba(255,244,230,.18), rgba(255,244,230,.07));
  border-color: rgba(255,232,204,.45);
  box-shadow:
    0 10px 0 rgba(25,6,4,.12),
    0 18px 28px rgba(20,5,3,.18),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.btn.light {
  color: #3a120d;
  background: linear-gradient(180deg, #fff8ef, #edc9a3 100%);
  border-color: rgba(255,248,239,.75);
  box-shadow:
    0 10px 0 rgba(129,76,41,.14),
    0 18px 28px rgba(20,5,3,.15),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -10px 18px rgba(145,91,51,.10);
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}

.tabs {
  padding: 6px;
  width: fit-content;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,253,249,.72), rgba(239,224,208,.76));
  box-shadow:
    0 18px 42px rgba(50,17,12,.14),
    inset 0 1px 0 rgba(255,255,255,.8);
  border: 1px solid rgba(216,185,154,.72);
}

.card,
.schedule-card,
.login-card {
  background: linear-gradient(180deg, rgba(255,253,249,.96), rgba(255,245,234,.90));
  border: 1px solid rgba(216,185,154,.82);
  box-shadow:
    0 24px 64px rgba(50,17,12,.16),
    0 3px 0 rgba(111,54,34,.05),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.schedule-card {
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    0 30px 72px rgba(50,17,12,.18),
    0 12px 0 rgba(111,54,34,.045),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.schedule-head {
  background:
    radial-gradient(circle at 95% 10%, rgba(196,122,39,.11), transparent 28%),
    linear-gradient(180deg, #fffdf9, #fff2e2);
  border-bottom: 1px solid rgba(216,185,154,.86);
}

.schedule-head h2 {
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}

.legend {
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7ed, #f0dcc7);
  border: 1px solid rgba(216,185,154,.7);
  box-shadow:
    0 8px 18px rgba(50,17,12,.09),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.grid-header {
  background: linear-gradient(180deg, #6f2118, #3a120d);
  box-shadow:
    inset 0 1px 0 rgba(255,226,197,.17),
    0 8px 18px rgba(50,17,12,.14);
}

.schedule-item {
  border-radius: 22px;
  margin-top: 10px;
  border-color: rgba(216,185,154,.68);
  background: linear-gradient(180deg, rgba(255,253,249,.90), rgba(248,236,223,.92));
  box-shadow:
    0 12px 24px rgba(50,17,12,.08),
    inset 0 1px 0 rgba(255,255,255,.82);
}

.schedule-item:nth-child(odd) {
  background: linear-gradient(180deg, rgba(255,250,243,.94), rgba(244,229,213,.96));
}

.schedule-item:hover {
  transform: translateY(-3px) scale(1.003);
  background: linear-gradient(180deg, #fff6e9, #ecd4bc);
  border-color: rgba(196,122,39,.40);
  box-shadow:
    0 20px 38px rgba(50,17,12,.16),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.schedule-item.today {
  background:
    linear-gradient(90deg, rgba(196,122,39,.26), transparent 34%),
    linear-gradient(180deg, #fff5e7, #efcfa9);
  border-color: rgba(196,122,39,.55);
  box-shadow:
    inset 7px 0 0 var(--amber),
    0 18px 36px rgba(196,122,39,.15),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.date-block strong,
.team-block {
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}

.count-pill {
  background: linear-gradient(180deg, #fffaf3, #f2ddc7);
  border-color: rgba(196,122,39,.34);
  box-shadow:
    0 6px 12px rgba(50,17,12,.10),
    inset 0 1px 0 rgba(255,255,255,.9),
    inset 0 -5px 10px rgba(196,122,39,.08);
}

.note-pill {
  background: linear-gradient(180deg, #ffe9c6, #f3c98d);
  border-color: rgba(196,122,39,.45);
  box-shadow:
    0 6px 14px rgba(196,122,39,.14),
    inset 0 1px 0 rgba(255,255,255,.68);
}

.today-badge,
.date-block em,
.today-dot {
  background: linear-gradient(180deg, #d98e30, #a6601c);
  box-shadow:
    0 6px 12px rgba(166,96,28,.22),
    inset 0 1px 0 rgba(255,232,204,.42);
}

.modal-backdrop {
  background:
    radial-gradient(circle at 50% 20%, rgba(214,163,77,.20), transparent 24%),
    rgba(31, 8, 6, .64);
}

.modal-card {
  background: linear-gradient(180deg, #fffdf9, #fff1df);
  border-color: rgba(216,185,154,.92);
  box-shadow:
    0 42px 110px rgba(20,6,4,.46),
    0 12px 0 rgba(85,31,21,.12),
    inset 0 1px 0 rgba(255,255,255,.95);
}

.input {
  background: linear-gradient(180deg, #fffdf9, #fff8f1);
  box-shadow:
    inset 0 2px 5px rgba(50,17,12,.05),
    0 1px 0 rgba(255,255,255,.9);
}

.employee-item {
  background: linear-gradient(180deg, #fffdf9, #fff3e5);
  box-shadow:
    0 12px 24px rgba(50,17,12,.08),
    inset 0 1px 0 rgba(255,255,255,.9);
}

@media (max-width: 680px) {
  .hero-panel {
    padding: 26px 18px 22px;
  }
  .tabs {
    width: 100%;
  }
}

/* v11: modal-only fix — clearer Luk button + shift dropdown/time picker */
.modal-close {
  width: 48px;
  height: 48px;
  color: #fff4e8;
  background: linear-gradient(180deg, #8c3324 0%, #5a1c14 100%);
  border: 1px solid rgba(255, 232, 204, .45);
  box-shadow:
    0 10px 22px rgba(65,25,18,.28),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -6px 12px rgba(30,7,5,.18);
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}
.modal-close:hover {
  background: linear-gradient(180deg, #a84431 0%, #6f2118 100%);
  transform: translateY(-1px);
}

.btn.close-secondary {
  color: #3a120d;
  background: linear-gradient(180deg, #fff8ef, #edc9a3 100%);
  border-color: rgba(128, 73, 44, .38);
  box-shadow:
    0 10px 0 rgba(129,76,41,.12),
    0 16px 24px rgba(50,17,12,.13),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -8px 14px rgba(145,91,51,.10);
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}
.btn.close-secondary:hover {
  background: linear-gradient(180deg, #fffdf8, #f1d3b3 100%);
}

.shift-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,250,244,.86), rgba(242,223,202,.64));
  border: 1px solid rgba(216,185,154,.78);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.78),
    0 10px 22px rgba(50,17,12,.06);
}
.shift-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shift-title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 950;
  color: var(--brown);
  letter-spacing: .01em;
}
.shift-help {
  margin: 0;
  font-size: 12px;
  color: #8a6e61;
}
.add-shift {
  min-height: 38px;
  white-space: nowrap;
  color: #3a120d !important;
  background: linear-gradient(180deg, #fff8ef, #f2d6b7) !important;
  border-color: rgba(128,73,44,.28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.9),
    0 8px 16px rgba(50,17,12,.08) !important;
}
.shift-rows {
  display: grid;
  gap: 10px;
}
.shift-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(100px, .58fr) minmax(100px, .58fr) 42px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,253,249,.84);
  border: 1px solid rgba(216,185,154,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.shift-employee-label { min-width: 0; }
.shift-remove {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff4e8;
  background: linear-gradient(180deg, #8c3324, #5a1c14);
  border: 1px solid rgba(255,232,204,.32);
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
  box-shadow:
    0 8px 16px rgba(65,25,18,.17),
    inset 0 1px 0 rgba(255,255,255,.18);
}
.shift-remove:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #a84431, #6f2118);
}

@media (max-width: 620px) {
  .shift-builder-head {
    align-items: stretch;
    flex-direction: column;
  }
  .add-shift { width: 100%; }
  .shift-row {
    grid-template-columns: 1fr;
  }
  .shift-remove {
    width: 100%;
  }
}

/* v13: visual-only fix for hard-to-see navigation buttons */
.header #logoutBtn.btn.secondary {
  color: #4a180f !important;
  background: linear-gradient(180deg, #fffaf3 0%, #f1d5b8 100%) !important;
  border: 1px solid rgba(92, 43, 27, .48) !important;
  box-shadow:
    0 10px 18px rgba(50,17,12,.12),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -8px 14px rgba(120,69,43,.10) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.75) !important;
}
.header #logoutBtn.btn.secondary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #edc69e 100%) !important;
  border-color: rgba(92, 43, 27, .70) !important;
  transform: translateY(-1px);
}

.tabs .btn {
  color: #fff1df !important;
  background: linear-gradient(180deg, #8e3324 0%, #5c1d14 100%) !important;
  border: 1px solid rgba(255,232,204,.22) !important;
  box-shadow:
    0 8px 14px rgba(50,17,12,.18),
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -7px 12px rgba(30,7,5,.16) !important;
  text-shadow: 0 1px 1px rgba(0,0,0,.18) !important;
}
.tabs .btn.secondary {
  color: #4a180f !important;
  background: linear-gradient(180deg, #fffaf3 0%, #efd1b1 100%) !important;
  border: 1px solid rgba(92,43,27,.36) !important;
  box-shadow:
    0 9px 16px rgba(50,17,12,.11),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -8px 16px rgba(120,69,43,.10) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.7) !important;
}
.tabs .btn:hover,
.tabs .btn.secondary:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

/* v17: employee management popup + activate/reactivate controls */
.employee-item.inactive {
  opacity: .72;
  background: linear-gradient(180deg, #f4eadf, #ead8c6);
}
.employee-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.btn.success {
  color: #fff8ee;
  background: linear-gradient(180deg, #397340 0%, #23552a 100%);
  border: 1px solid rgba(232,255,226,.26);
  box-shadow:
    0 12px 20px rgba(30,70,33,.18),
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -7px 12px rgba(8,36,12,.14);
}
.employee-modal-card {
  max-width: 680px;
}
@media (max-width: 680px) {
  .employee-item {
    align-items: stretch;
    flex-direction: column;
  }
  .employee-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .employee-actions .btn {
    width: 100%;
  }
}

/* v18: make employee Rediger button clearly visible only */
.employee-actions .btn.edit-employee {
  color: #fff7eb !important;
  background: linear-gradient(180deg, #b46b24 0%, #8e3a21 52%, #5c1d14 100%) !important;
  border: 1px solid rgba(255, 231, 191, .58) !important;
  box-shadow:
    0 14px 26px rgba(65, 25, 18, .24),
    0 4px 0 rgba(65, 25, 18, .28),
    inset 0 1px 0 rgba(255,255,255,.32),
    inset 0 -10px 18px rgba(58, 13, 9, .18) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.28) !important;
}
.employee-actions .btn.edit-employee:hover {
  background: linear-gradient(180deg, #c98032 0%, #9a4025 52%, #662116 100%) !important;
  box-shadow:
    0 17px 30px rgba(65, 25, 18, .30),
    0 5px 0 rgba(65, 25, 18, .28),
    inset 0 1px 0 rgba(255,255,255,.36),
    inset 0 -10px 18px rgba(58, 13, 9, .18) !important;
}

/* v27: week divider matches the table header exactly */
.schedule-card {
  overflow: hidden;
}

.schedule-grid {
  padding-left: 18px;
  padding-right: 18px;
}

.grid-header {
  margin-left: -18px !important;
  margin-right: -18px !important;
  width: calc(100% + 36px) !important;
  border-radius: 0 !important;
}

.week-banner.grid-header {
  margin-top: 14px !important;
  margin-bottom: 12px !important;
  min-height: 46px;
  box-shadow:
    inset 0 1px 0 rgba(255,226,197,.17),
    0 8px 18px rgba(50,17,12,.14);
}

.week-banner.bottom {
  min-height: 18px;
  margin: 14px -18px -20px !important;
  padding: 0;
  background: linear-gradient(180deg, #6f2118, #3a120d);
  color: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255,226,197,.17),
    0 8px 18px rgba(50,17,12,.14);
}

@media (max-width: 760px) {
  .week-banner.bottom {
    margin-left: -12px !important;
    margin-right: -12px !important;
    margin-bottom: -16px !important;
  }
}


/* v28: password-change button beside logout */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-actions .btn.secondary {
  color: #4a180f !important;
  background: linear-gradient(180deg, #fffaf3 0%, #f1d5b8 100%) !important;
  border: 1px solid rgba(92, 43, 27, .48) !important;
  box-shadow:
    0 10px 18px rgba(50,17,12,.12),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -8px 14px rgba(120,69,43,.10) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.75) !important;
}
.password-modal-card {
  max-width: 520px;
}
#passwordError {
  min-height: 18px;
  margin-top: -4px;
}
@media (max-width: 560px) {
  .header-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .header-actions .btn {
    min-height: 38px;
    padding: 8px 11px;
  }
}

/* v30: password visibility eye buttons */
.password-control {
  position: relative;
  display: flex;
  align-items: center;
}
.password-control .input {
  width: 100%;
  padding-right: 52px !important;
}
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(92,43,27,.28);
  background: linear-gradient(180deg, #fffaf3 0%, #efd4b5 100%);
  color: #4a180f;
  cursor: pointer;
  box-shadow:
    0 7px 12px rgba(65,25,18,.14),
    inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 16px;
  line-height: 1;
}
.password-toggle:hover {
  transform: translateY(-50%) translateY(-1px);
  box-shadow:
    0 10px 16px rgba(65,25,18,.18),
    inset 0 1px 0 rgba(255,255,255,.95);
}
.password-toggle:active {
  transform: translateY(-50%) translateY(1px);
}

/* v32: clean print/PDF export buttons */
.export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: -6px 0 18px;
}
.export-actions .export-btn {
  min-width: 150px;
}
@media (max-width: 680px) {
  .export-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 0;
  }
  .export-actions .export-btn {
    width: 100%;
  }
}

/* v34: toolbar + print/PDF layout cleanup */
.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.toolbar-row .tabs,
.toolbar-row .export-actions {
  margin: 0 !important;
}
.export-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}
.export-actions .export-btn {
  min-width: 150px;
  min-height: 44px;
  color: #fff7e8 !important;
  background: linear-gradient(180deg, #9a3c2b 0%, #6b2118 100%) !important;
  border: 1px solid rgba(255, 231, 191, .35) !important;
  box-shadow:
    0 13px 24px rgba(65, 25, 18, .24),
    0 4px 0 rgba(65, 25, 18, .22),
    inset 0 1px 0 rgba(255,255,255,.28) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.export-actions .export-btn.print-action {
  background: linear-gradient(180deg, #d18a34 0%, #8a3d1f 100%) !important;
  border-color: rgba(255, 235, 200, .55) !important;
}
.export-actions .export-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(65, 25, 18, .30),
    0 5px 0 rgba(65, 25, 18, .22),
    inset 0 1px 0 rgba(255,255,255,.33) !important;
}
@media (max-width: 760px) {
  .toolbar-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .toolbar-row .tabs,
  .toolbar-row .export-actions {
    width: 100%;
  }
  .export-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .export-actions .export-btn {
    min-width: 0;
    width: 100%;
  }
}


/* v40: professional visual polish — smaller hero, clearer schedule hierarchy, cleaner header */
.header-inner {
  max-width: 1260px;
  padding: 10px 22px;
}
.brand {
  gap: 14px;
}
.logo.small {
  width: 60px;
  height: 60px;
}
.brand h1 {
  font-size: 18px;
  letter-spacing: -.03em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-actions .btn.secondary {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #4a190f !important;
  background: linear-gradient(180deg, #fffdf9 0%, #f2dcc5 100%) !important;
  border: 1px solid rgba(112, 62, 38, .34) !important;
  box-shadow:
    0 8px 18px rgba(50,17,12,.08),
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -8px 12px rgba(150,95,56,.07) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}

.hero-panel {
  padding: 20px 28px 22px;
  border-radius: 28px;
  gap: 14px;
  box-shadow:
    0 26px 68px rgba(50,17,12,.26),
    0 8px 0 rgba(71,30,22,.08),
    inset 0 1px 0 rgba(255,242,225,.26),
    inset 0 -22px 48px rgba(20,5,3,.16);
}
.hero-panel::before {
  inset: 10px;
  border-radius: 22px;
}
.hero-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 232, 204, .10);
  border: 1px solid rgba(255, 232, 204, .20);
  color: #f5d7b4;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.hero-panel h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.02;
}
.hero-subtitle {
  margin: 0;
  color: #ffead4;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.02em;
  text-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.sync-pill {
  margin-top: 0;
  font-size: 11.5px;
  padding: 7px 12px;
}
.hero-actions {
  width: 100%;
  max-width: 760px;
  justify-content: center !important;
  margin-top: 6px;
  gap: 12px;
}
.hero-actions .btn {
  flex: 1 1 190px;
  min-width: 180px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 15px;
}
.hero-actions .btn.secondary {
  background: linear-gradient(180deg, rgba(255,244,230,.16), rgba(255,244,230,.08));
  border-color: rgba(255,232,204,.40);
}
.hero-actions .btn.light {
  background: linear-gradient(180deg, #fff8ef, #f3dfca 100%);
}

.toolbar-row {
  align-items: center;
  gap: 16px;
}
.tabs {
  padding: 5px;
  border-radius: 17px;
}
.tabs .btn {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 13px;
}
.export-actions .export-btn.print-action {
  min-width: 138px;
  min-height: 42px;
  border-radius: 15px;
}

.card.schedule-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,253,249,.97), rgba(255,245,234,.93));
}
.schedule-grid {
  padding: 0 16px 18px;
}
.grid-header,
.week-banner.grid-header {
  margin: 0 -16px 10px;
  padding: 12px 20px;
  background: linear-gradient(180deg, #6b2118, #41130e);
  box-shadow:
    inset 0 1px 0 rgba(255,226,197,.18),
    0 8px 18px rgba(50,17,12,.12);
}
.week-banner.grid-header {
  margin-top: 16px;
}
.week-banner.bottom {
  height: 14px;
  margin: 14px -16px 0;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(180deg, #6b2118, #41130e);
}
.schedule-item {
  position: relative;
  min-height: 64px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(216,185,154,.68);
  background: linear-gradient(180deg, #fffdf9, #f8f0e6);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.90),
    0 6px 14px rgba(50,17,12,.05);
}
.schedule-item.empty-day {
  background: linear-gradient(180deg, #fffdf9, #f6efe7);
  border-color: rgba(221,198,176,.78);
}
.schedule-item.filled {
  background: linear-gradient(180deg, #fff9f1, #f1e0cd);
  border-color: rgba(210,170,132,.82);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.92),
    0 10px 22px rgba(50,17,12,.07);
}
.schedule-item.filled::after {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d59a42, #8e4521);
  opacity: .8;
}
.schedule-item:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #fff7ed, #ecd8c1);
}
.schedule-item.today {
  background:
    linear-gradient(90deg, rgba(196,122,39,.22), transparent 26%),
    linear-gradient(180deg, #fff6ea, #efd4b1);
  border-color: rgba(196,122,39,.55);
  box-shadow:
    inset 6px 0 0 var(--amber),
    0 18px 34px rgba(196,122,39,.12),
    inset 0 1px 0 rgba(255,255,255,.94);
}
.date-block {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(248,235,219,.86));
  border: 1px solid rgba(221,198,176,.60);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}
.schedule-item.filled .date-block {
  background: linear-gradient(180deg, #fffaf3, #f3e3d1);
}
.date-block strong {
  font-size: 16px;
  line-height: 1.05;
}
.date-block span {
  font-size: 14px;
  line-height: 1.1;
}
.team-block {
  font-size: 15px;
  font-weight: 900;
}
.schedule-item.empty-day .team-block .muted {
  color: #937d71;
}
.note-block {
  display: flex;
  align-items: center;
}
.count-pill {
  min-width: 46px;
  min-height: 32px;
  background: linear-gradient(180deg, #fffdf9, #f4e1cb);
  border-color: rgba(196,122,39,.32);
}
.schedule-item.filled .count-pill:not(.empty) {
  background: linear-gradient(180deg, #fff7ed, #efcfab);
  border-color: rgba(196,122,39,.48);
  box-shadow:
    0 6px 14px rgba(196,122,39,.12),
    inset 0 1px 0 rgba(255,255,255,.92),
    inset 0 -5px 10px rgba(196,122,39,.10);
}
.note-pill {
  background: linear-gradient(180deg, #ffeac7, #f0c98d);
  border-color: rgba(196,122,39,.45);
}
.muted {
  color: #8f776a;
}

@media (max-width: 900px) {
  .header-inner {
    padding: 10px 14px;
  }
  .hero-panel {
    padding: 20px 18px;
    border-radius: 24px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
}
@media (max-width: 760px) {
  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .logo.small {
    width: 52px;
    height: 52px;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .schedule-grid {
    padding: 0 12px 16px;
  }
  .grid-header,
  .week-banner.grid-header {
    display: none;
  }
  .week-banner.bottom {
    margin: 10px -12px 0;
  }
}


/* v43: backup button + empty login defaults */
.header-actions .backup-action {
  color: #fff4e8 !important;
  background: linear-gradient(180deg, #b8752e 0%, #7a321c 100%) !important;
  border-color: rgba(255, 231, 191, .48) !important;
}
.header-actions .backup-action:hover {
  background: linear-gradient(180deg, #c9873a 0%, #8a3d22 100%) !important;
}


/* v44: developer backup import button */
.header-actions .import-backup-action {
  background: linear-gradient(180deg, #845b34 0%, #5b2a18 100%) !important;
}
.header-actions .import-backup-action:hover {
  background: linear-gradient(180deg, #986b3e 0%, #6d341f 100%) !important;
}
@media (max-width: 760px) {
  .header-actions {
    gap: 8px;
  }
}


/* v46: login loading screen */
.login-page {
  position: relative;
  overflow: hidden;
}
.login-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 235, 211, .20), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(196, 122, 39, .18), transparent 34%),
    rgba(31, 8, 6, .72);
  backdrop-filter: blur(10px);
  animation: loginFadeIn .22s ease-out both;
}
.login-loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: min(340px, 92vw);
  padding: 30px 28px 26px;
  border-radius: 34px;
  color: #fff2df;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 232, 204, .16), transparent 40%),
    linear-gradient(145deg, #2b0b07 0%, #4b170f 52%, #855744 100%);
  border: 1px solid rgba(255, 232, 204, .22);
  box-shadow:
    0 34px 90px rgba(20, 5, 3, .48),
    inset 0 1px 0 rgba(255, 242, 225, .25),
    inset 0 -22px 44px rgba(20, 5, 3, .18);
}
.login-loading-logo-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
}
.login-loading-logo-wrap::before,
.login-loading-logo-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 232, 204, .34);
  animation: logoPulseRing 1.45s ease-out infinite;
}
.login-loading-logo-wrap::after {
  animation-delay: .42s;
}
.login-loading-logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  border-radius: 999px;
  filter:
    drop-shadow(0 18px 18px rgba(0,0,0,.36))
    drop-shadow(0 2px 0 rgba(255,255,255,.18));
  animation: logoGrowPulse 1.35s ease-in-out infinite;
}
.login-loading-card p {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.03em;
  text-shadow: 0 7px 22px rgba(0,0,0,.28);
}
.login-loading-card span {
  color: rgba(255, 232, 204, .82);
  font-size: 14px;
  font-weight: 800;
}
@keyframes loginFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes logoGrowPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.13); }
}
@keyframes logoPulseRing {
  0% { transform: scale(.72); opacity: .78; }
  100% { transform: scale(1.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .login-loading-overlay,
  .login-loading-logo,
  .login-loading-logo-wrap::before,
  .login-loading-logo-wrap::after {
    animation: none !important;
  }
}


/* v47: mobile-friendly polish only — keeps login loading unchanged */
@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(255,255,255,.48), transparent 24%),
      linear-gradient(180deg, #fff8ef 0%, #ead6c1 100%);
  }

  .header {
    position: relative;
    top: auto;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px 16px;
  }

  .header .brand {
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }

  .header .logo.small {
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
  }

  .header .brand h1 {
    font-size: 24px;
    line-height: 1.05;
    max-width: 220px;
  }

  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .header-actions .btn,
  .header-actions .btn.secondary,
  .header-actions .backup-action {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.1;
    box-shadow:
      0 7px 14px rgba(50,17,12,.10),
      inset 0 1px 0 rgba(255,255,255,.92) !important;
  }

  #changePasswordBtn {
    grid-column: 1 / -1;
  }

  #logoutBtn {
    grid-column: 1 / -1;
  }

  .container.clean {
    padding: 14px 14px 28px;
  }

  .hero-panel {
    margin-bottom: 14px;
    padding: 22px 18px 20px;
    border-radius: 26px;
  }

  .hero-panel h2 {
    font-size: clamp(30px, 8vw, 38px);
    line-height: 1.08;
    letter-spacing: -.055em;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .hero-actions .btn {
    min-height: 48px;
    border-radius: 16px;
    font-size: 15px;
  }

  .toolbar-row {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    gap: 5px;
  }

  .tabs .btn {
    width: 100%;
    min-height: 42px;
  }

  .export-actions {
    width: 100%;
  }

  .export-actions .export-btn.print-action {
    width: 100%;
    min-height: 44px;
  }

  .card.schedule-card {
    border-radius: 26px;
    overflow: visible;
  }

  .schedule-grid {
    gap: 8px;
    padding: 12px 10px 14px;
  }

  .schedule-item {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: auto;
    margin: 0;
    padding: 14px;
    border-radius: 20px;
  }

  .schedule-item.filled::after {
    top: 14px;
    bottom: 14px;
  }

  .date-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .date-block strong {
    font-size: 20px;
  }

  .date-block span {
    font-size: 18px;
    font-weight: 950;
    white-space: nowrap;
  }

  .date-block em {
    margin-top: 0;
    margin-left: 0;
    font-size: 12px;
  }

  .team-block,
  .note-block {
    font-size: 16px;
    line-height: 1.35;
  }

  .team-block::before,
  .note-block::before,
  .schedule-item > div:nth-child(3)::before,
  .schedule-item > div:nth-child(4)::before {
    display: inline;
    font-size: 15px;
    color: var(--brown);
    font-weight: 950;
  }

  .count-pill {
    min-width: 38px;
    min-height: 28px;
    padding: 2px 10px;
  }

  .week-banner.bottom {
    height: 10px;
    border-radius: 0 0 20px 20px;
  }

  .modal-backdrop {
    align-items: start;
    place-items: start center;
    padding: 18px 12px;
    overflow-y: auto;
  }

  .modal-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 22px 20px;
    border-radius: 28px;
    margin: 12px auto 24px;
  }

  .modal-card h2 {
    font-size: 28px;
    line-height: 1.12;
    margin-right: 54px;
  }

  .modal-close {
    width: 44px;
    height: 44px;
    top: 16px;
    right: 16px;
  }

  .day-preview {
    padding: 12px;
    border-radius: 16px;
    font-size: 14px;
  }

  .shift-builder {
    padding: 12px;
    border-radius: 20px;
  }

  .shift-builder-head {
    gap: 10px;
  }

  .shift-builder-head .add-shift {
    min-height: 42px;
    font-size: 15px;
  }

  .shift-row {
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
  }

  .shift-row .input,
  .edit-form .input {
    min-height: 48px;
    border-radius: 16px;
    font-size: 16px;
  }

  .shift-remove {
    height: 46px;
    border-radius: 16px;
  }

  .modal-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  .employee-card {
    border-radius: 26px;
    padding: 16px;
  }

  .employee-form .grid-2,
  .employee-modal-card .grid-2 {
    grid-template-columns: 1fr;
  }

  .employee-list {
    gap: 12px;
  }

  .employee-item {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 22px;
  }

  .employee-item p strong {
    font-size: 21px;
  }

  .employee-item .muted {
    font-size: 16px;
    line-height: 1.35;
  }

  .employee-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .employee-actions .btn {
    width: 100%;
    min-height: 44px;
    border-radius: 16px;
  }
}

@media (max-width: 420px) {
  .header .brand h1 {
    font-size: 22px;
    max-width: 200px;
  }

  .header-actions {
    grid-template-columns: 1fr;
  }

  .header-actions .btn,
  .header-actions .backup-action,
  #changePasswordBtn,
  #logoutBtn {
    grid-column: auto;
  }

  .container.clean {
    padding-left: 10px;
    padding-right: 10px;
  }

  .hero-panel h2 {
    font-size: 29px;
  }

  .date-block strong {
    font-size: 18px;
  }

  .date-block span {
    font-size: 16px;
  }

  .modal-card {
    padding: 20px 16px;
  }
}


/* v48: mobile app-style controls — compact same-line buttons */
@media (max-width: 760px) {
  .container.clean {
    padding-top: 10px;
  }

  .hero-panel {
    padding: 18px 14px 16px;
    border-radius: 24px;
    margin-bottom: 12px;
  }

  .hero-panel h2 {
    font-size: clamp(27px, 7vw, 34px);
    line-height: 1.05;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
  }

  .hero-actions .btn {
    min-width: 0 !important;
    width: 100%;
    min-height: 39px;
    padding: 7px 6px;
    border-radius: 13px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: -.02em;
    white-space: nowrap;
    box-shadow:
      0 7px 0 rgba(45,12,8,.10),
      0 11px 18px rgba(65,25,18,.18),
      inset 0 1px 0 rgba(255,238,220,.22),
      inset 0 -8px 12px rgba(30,7,5,.12);
  }

  .toolbar-row {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(92px, .85fr);
    gap: 8px;
    align-items: stretch;
    margin-bottom: 12px;
  }

  .toolbar-row .tabs {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
    border-radius: 15px;
  }

  .toolbar-row .tabs .btn {
    min-height: 38px;
    padding: 7px 6px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .toolbar-row .export-actions {
    width: 100%;
    display: block !important;
  }

  .toolbar-row .export-actions .export-btn.print-action {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    height: 100%;
    padding: 7px 6px;
    border-radius: 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .schedule-grid {
    padding: 10px 8px 12px;
  }

  .schedule-item {
    padding: 12px;
    border-radius: 18px;
    gap: 8px;
  }

  .date-block {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .date-block strong {
    font-size: 18px;
  }

  .date-block span {
    font-size: 16px;
  }

  .team-block,
  .note-block {
    font-size: 15px;
  }

  .team-block::before,
  .note-block::before,
  .schedule-item > div:nth-child(3)::before,
  .schedule-item > div:nth-child(4)::before {
    font-size: 14px;
  }

  .employee-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .employee-actions .btn {
    min-height: 40px;
    padding: 7px 6px;
    font-size: 12px;
    border-radius: 13px;
  }

  .employee-actions .btn.edit-employee {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    gap: 5px !important;
  }

  .hero-actions .btn,
  .toolbar-row .tabs .btn,
  .toolbar-row .export-actions .export-btn.print-action {
    font-size: 11px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .toolbar-row {
    grid-template-columns: minmax(0, 1.8fr) minmax(78px, .75fr);
    gap: 6px;
  }

  .employee-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .employee-actions .btn {
    font-size: 11px;
    padding-left: 4px;
    padding-right: 4px;
  }
}


/* v49: mobile header action buttons — compact two-column app feel */
@media (max-width: 760px) {
  .header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
  }

  .header-actions .btn,
  .header-actions .btn.secondary,
  .header-actions .backup-action {
    min-height: 38px !important;
    padding: 7px 8px !important;
    border-radius: 13px !important;
    font-size: 12px !important;
    line-height: 1.05 !important;
    white-space: nowrap;
  }

  #changePasswordBtn,
  #logoutBtn {
    grid-column: auto !important;
  }

  #changePasswordBtn {
    color: #3a120d !important;
    background: linear-gradient(180deg, #fff8ef 0%, #eac9a5 100%) !important;
    border: 1px solid rgba(92,43,27,.36) !important;
    box-shadow:
      0 7px 13px rgba(50,17,12,.10),
      inset 0 1px 0 rgba(255,255,255,.94),
      inset 0 -7px 12px rgba(145,91,51,.10) !important;
  }

  #logoutBtn {
    color: #fff4ea !important;
    background: linear-gradient(180deg, #b42b22 0%, #861d17 56%, #5f130f 100%) !important;
    border: 1px solid rgba(255,214,196,.42) !important;
    box-shadow:
      0 8px 15px rgba(120,25,18,.22),
      inset 0 1px 0 rgba(255,255,255,.20),
      inset 0 -8px 13px rgba(50,8,6,.20) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.32) !important;
  }

  #logoutBtn:hover {
    background: linear-gradient(180deg, #c7352a 0%, #941f18 56%, #68140f 100%) !important;
  }
}

@media (max-width: 420px) {
  .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .header-actions .btn,
  .header-actions .btn.secondary,
  .header-actions .backup-action {
    font-size: 11px !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
}
