@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;500;600&display=swap');

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

:root {
  --red:       #C8102E;
  --red-dark:  #9E0C23;
  --red-light: #F5D0D6;
  --red-xl:    #FDF0F2;
  --border:    #E0E0E0;
  --gray-bg:   #F5F5F5;
  --t1:        #1A1A1A;
  --t2:        #6B6B6B;
  --t3:        #9E9E9E;
  --white:     #FFFFFF;
  --font:      'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  color: var(--t1);
  background: #F8F8F8;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1000px; margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.logo-area { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-badge {
  width: 38px; height: 38px; background: var(--red); border-radius: 4px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.logo-badge svg { width: 22px; height: 22px; fill: white; }
.logo-name { font-size: 15px; font-weight: 600; color: var(--t1); letter-spacing: -.2px; }
.logo-name span { color: var(--red); }
.logo-sub { font-size: 10px; color: var(--t3); letter-spacing: .6px; text-transform: uppercase; }
.header-btn {
  background: var(--red); color: white; border: none;
  padding: 8px 18px; border-radius: 3px; font-size: 13px;
  cursor: pointer; font-family: var(--font); font-weight: 600;
  transition: background .15s; white-space: nowrap;
}
.header-btn:hover { background: var(--red-dark); }

/* ── NAV ── */
.nav-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; display: flex; }
.nav-item {
  padding: 12px 20px; font-size: 13px; cursor: pointer;
  border: none; background: transparent; font-family: var(--font);
  color: var(--t2); border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: all .15s; text-decoration: none;
  display: inline-flex; align-items: center;
}
.nav-item:hover { color: var(--red); }
.nav-item.active { color: var(--red); border-bottom-color: var(--red); font-weight: 600; }

/* ── MAIN ── */
.main { max-width: 1000px; margin: 0 auto; padding: 2rem 1.5rem; }
.view { display: none; }
.view.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }

.section-label {
  font-size: 10px; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--t3); margin-bottom: 1rem;
}

/* ── EVENT CARDS ── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.event-card {
  background: var(--white); border: 1px solid var(--border);
  border-top: 3px solid var(--border); border-radius: 4px;
  padding: 1.1rem 1.2rem; cursor: pointer;
  transition: border-color .15s, border-top-color .15s;
}
.event-card:hover { border-top-color: var(--red); border-color: rgba(200,16,46,.25); }
.ev-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  font-size: 11px; padding: 2px 8px; border-radius: 2px;
  border: 1px solid var(--border); color: var(--t2); background: var(--gray-bg);
}
.chip.red { background: var(--red-xl); border-color: var(--red-light); color: var(--red-dark); }
.ev-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: var(--t3);
  border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px;
}
.avatar-stack { display: flex; }
.av {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--red-light); border: 2px solid var(--white);
  color: var(--red-dark); font-size: 9px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-left: -6px;
}
.av:first-child { margin-left: 0; }
.new-card {
  border-style: dashed !important; border-top-color: transparent !important;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; color: var(--t3); font-size: 13px; min-height: 116px;
  text-decoration: none;
}
.new-card:hover { border-color: var(--red) !important; color: var(--red); }
.plus-circle {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; flex-shrink: 0;
}

/* ── FORM ── */
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1rem; }
.fg { margin-bottom: 1rem; }
.fg label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--t2); margin-bottom: 5px;
  text-transform: uppercase; letter-spacing: .4px;
}
input[type=text], input[type=email], input[type=password], textarea {
  width: 100%; font-family: var(--font); font-size: 13px;
  border: 1px solid var(--border); border-radius: 3px;
  background: var(--white); color: var(--t1);
  padding: 8px 10px; outline: none; transition: border-color .15s;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus, textarea:focus { border-color: var(--red); }
textarea { height: 64px; resize: vertical; }

/* ── CALENDAR ── */
.cal-wrap { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--red); color: white;
}
.cal-head-month { font-size: 13px; font-weight: 600; }
.cal-nav-btn {
  background: none; border: 1px solid rgba(255,255,255,.45); border-radius: 3px;
  width: 26px; height: 26px; cursor: pointer; font-size: 15px; color: white;
  display: flex; align-items: center; justify-content: center; font-family: var(--font);
  transition: background .1s;
}
.cal-nav-btn:hover { background: rgba(255,255,255,.15); }
.cal-body { padding: 10px 12px; background: var(--white); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dn { font-size: 10px; color: var(--t3); text-align: center; padding: 4px 0; font-weight: 600; }
.cal-d {
  font-size: 12px; text-align: center; padding: 6px 2px; border-radius: 2px;
  cursor: pointer; border: 1px solid transparent; transition: all .1s; line-height: 1.3;
}
.cal-d:hover:not(.past):not(.empty) { background: var(--red-xl); }
.cal-d.sel { background: var(--red) !important; color: white; font-weight: 600; }
.cal-d.today:not(.sel) { font-weight: 700; border-color: var(--border); }
.cal-d.past, .cal-d.empty { color: var(--t3); pointer-events: none; }
.cal-d.nonwork:not(.sel) { color: var(--t3); background: var(--gray-bg); }
.cal-d.has-slots:not(.sel) { font-weight: 700; border-color: var(--red-light); color: var(--red-dark); background: var(--red-xl); }

/* ── TIME CHIPS ── */
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 5px; margin-top: 8px; }
.t-chip {
  padding: 6px 4px; text-align: center; border: 1px solid var(--border);
  border-radius: 3px; font-size: 12px; cursor: pointer;
  background: transparent; color: var(--t2); font-family: var(--font); transition: all .1s;
}
.t-chip:hover { background: var(--red-xl); border-color: var(--red-light); color: var(--red-dark); }
.t-chip.sel { background: var(--red); border-color: var(--red); color: white; font-weight: 600; }

/* ── SLOT PILLS ── */
.slot-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--red-xl); border: 1px solid var(--red-light);
  border-radius: 2px; padding: 3px 10px; font-size: 11px; color: var(--red-dark); margin: 2px;
}
.slot-pill button {
  background: none; border: none; cursor: pointer;
  color: var(--red); font-size: 15px; padding: 0; line-height: 1; font-family: var(--font);
}

/* ── BUTTONS ── */
.btn-p {
  background: var(--red); color: white; border: none;
  padding: 9px 22px; border-radius: 3px; font-size: 13px;
  cursor: pointer; font-family: var(--font); font-weight: 600; transition: background .15s;
}
.btn-p:hover { background: var(--red-dark); }
.btn-s {
  background: transparent; border: 1px solid var(--border);
  padding: 9px 20px; border-radius: 3px; font-size: 13px;
  cursor: pointer; font-family: var(--font); color: var(--t1); transition: background .15s;
}
.btn-s:hover { background: var(--gray-bg); }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--red); background: none; border: none;
  cursor: pointer; font-family: var(--font); padding: 0; margin-bottom: 1.5rem;
}
.back-btn:hover { color: var(--red-dark); text-decoration: underline; }

/* ── VOTE VIEW ── */
.vote-ev-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.vote-ev-meta { font-size: 12px; color: var(--t2); margin-bottom: 1.5rem; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 1.75rem; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: 3px; padding: 12px 14px; }
.stat-n { font-size: 22px; font-weight: 600; color: var(--red); margin-bottom: 2px; }
.stat-l { font-size: 10px; color: var(--t3); text-transform: uppercase; letter-spacing: .5px; }

.vote-layout { display: flex; flex-direction: column; gap: 1.5rem; }

.slot-row {
  display: grid; grid-template-columns: 24px 1fr auto 52px;
  align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.slot-row:last-child { border-bottom: none; }
.slot-check {
  width: 22px; height: 22px; border-radius: 3px;
  border: 1px solid var(--border); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; background: transparent; flex-shrink: 0;
  transition: all .1s; font-family: var(--font); user-select: none;
}
.slot-check.on { background: var(--red); border-color: var(--red); color: white; }
.slot-check:hover { border-color: var(--red); }
.slot-name { font-size: 13px; }
.slot-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; }
.slot-bar { height: 4px; background: var(--red); border-radius: 2px; transition: width .4s ease; }
.slot-count { font-size: 12px; color: var(--t2); text-align: right; }
.slot-row.winner .slot-name { color: var(--red-dark); font-weight: 600; }
.slot-row.winner .slot-count { color: var(--red); font-weight: 600; }

.sidebar-box {
  background: var(--gray-bg); border: 1px solid var(--border);
  border-top: 3px solid var(--red); border-radius: 4px; padding: 1rem; height: fit-content;
}
.sidebar-title {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .6px; color: var(--t2); margin-bottom: .9rem;
}
.voter-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--red-light); color: var(--red-dark);
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.voter-name-s { font-size: 12px; font-weight: 500; }
.voter-dispo { font-size: 11px; color: var(--t3); }
.voter-comment { font-size: 11px; color: #8a6d00; background: #fff8e1; border-radius: 3px; padding: 3px 6px; margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
/* Slot participant names */
.slot-yes-names { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; padding-top: 6px; margin-left: 2rem; }
.slot-yes-chip  { font-size: 11px; background: var(--red-xl); border: 1px solid var(--red-light); color: var(--red-dark); border-radius: 20px; padding: 1px 8px; white-space: nowrap; }

.submit-row { display: flex; gap: 8px; margin-top: 1.25rem; align-items: center; }
.submit-row input { flex: 1; }
.submit-row--stacked { flex-direction: column; align-items: stretch; }
.submit-row--stacked input { flex: none; }
.comment-ta { font-family: var(--font); font-size: 13px; border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px; resize: vertical; box-sizing: border-box; color: var(--t1); background: var(--white); outline: none; width: 100%; }

/* Slot label: date + time parts */
.slot-lbl-date { display: block; font-weight: 600; font-size: 14px; }
.slot-lbl-time { display: block; font-size: 13px; color: var(--t2); margin-top: 1px; }
.slot-dur-badge { display: inline-block; font-size: 11px; color: var(--red-dark); background: var(--red-xl); border-radius: 20px; padding: 1px 7px; margin-top: 3px; font-weight: 500; white-space: nowrap; }
.success-msg {
  font-size: 12px; font-weight: 600; color: #2E7D32;
  margin-top: 8px; display: none; padding: 7px 12px;
  background: #F1F8F1; border-radius: 3px; border-left: 3px solid #4CAF50;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--white); border-top: 1px solid var(--border);
  margin-top: 3rem; padding: 1.25rem 1.5rem;
  text-align: center; font-size: 11px; color: var(--t3);
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .form-2col { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .header-inner { padding: 0 1rem; }
  .main { padding: 1.25rem 1rem; }
  .slot-row { grid-template-columns: 24px 1fr 42px; }
  .slot-bar-wrap { display: none; }
  .logo-sub { display: none; }
}

/* ── INPUT EMAIL / PASSWORD ── */
/* covered by shared selector above */

/* ── BACK BTN as link ── */
a.back-btn { display: inline-flex; }
a.btn-s { text-decoration: none; display: inline-flex; align-items: center; }
a.btn-p { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
a.header-btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ── BADGE ── */
.badge { display: inline-block; padding: 2px 7px; border-radius: 2px; font-size: 10px; font-weight: 600; letter-spacing: .3px; }
.badge-open   { background: #F1F8F1; color: #2E7D32; border: 1px solid #C8E6C9; }
.badge-closed { background: #F5F5F5; color: #9E9E9E; border: 1px solid #E0E0E0; }

/* ── ALERTS ── */
.alert { padding: 10px 14px; border-radius: 3px; margin-bottom: 1rem; font-size: 13px; border-left: 3px solid; }
.alert-success { background: #F1F8F1; border-color: #4CAF50; color: #2E7D32; }
.alert-error   { background: #FDF0F2; border-color: #C8102E; color: #9E0C23; }
.alert-warning { background: #FFFBF0; border-color: #F59E0B; color: #92400E; }

/* ── HINTS & REQUIRED ── */
.hint { font-size: 11px; color: var(--t3); margin-top: 3px; }
.req  { color: var(--red); }

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ── SLOT ROW READ-ONLY (admin results) ── */
.slot-row-ro {
  display: grid; grid-template-columns: 1fr 90px 52px;
  align-items: center; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.slot-row-ro:last-child { border-bottom: none; }
.slot-row-ro.winner .slot-name { color: var(--red-dark); font-weight: 600; }

/* ── ADMIN BOX ── */
.admin-box { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.25rem; }
.admin-box-title {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--t2); margin-bottom: .9rem;
  display: flex; align-items: center; justify-content: space-between;
}
.btn-danger {
  background: transparent; border: 1px solid #FFCDD2; color: #C62828;
  padding: 7px 14px; border-radius: 3px; font-size: 12px;
  cursor: pointer; font-family: var(--font); transition: background .15s;
}
.btn-danger:hover { background: #FFEBEE; }

/* ── SHARE BOX ── */
.share-box { display: flex; gap: 6px; }
.share-box input { flex: 1; font-size: 12px !important; }
.btn-copy {
  background: var(--gray-bg); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 3px; font-size: 12px;
  cursor: pointer; font-family: var(--font); white-space: nowrap; transition: background .15s;
}
.btn-copy:hover { background: #E8E8E8; }

/* ── DATE CARDS (per-date slot selection in create form) ── */
.date-cards-wrap {
  display: flex; flex-direction: column; gap: 8px;
}
.date-cards-empty {
  display: flex; align-items: center; justify-content: center;
  min-height: 100px; font-size: 12px; color: var(--t3); text-align: center;
  border: 1px dashed var(--border); border-radius: 4px; padding: 1rem;
}
.date-card { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: var(--white); }
.date-card-header {
  background: var(--gray-bg); border-bottom: 1px solid var(--border);
  padding: 7px 12px; display: flex; align-items: center; justify-content: space-between;
}
.date-card-title { font-size: 12px; font-weight: 600; color: var(--t1); }
.date-card-remove {
  background: none; border: none; cursor: pointer;
  color: var(--t3); font-size: 14px; padding: 0 2px; line-height: 1;
  font-family: var(--font); transition: color .1s;
}
.date-card-remove:hover { color: var(--red); }
.date-card-body { padding: 8px 12px 10px; }
.date-card-body .time-grid { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); margin-top: 0; }
.date-card-pills { margin-top: 7px; min-height: 22px; }
.date-card-hint { font-size: 10px; color: var(--t3); margin-top: 5px; }

/* ── SLOT SUMMARY ── */
.slot-summary-box { border: 1px solid var(--border); border-radius: 4px; background: var(--white); padding: 10px 14px; margin-top: 1rem; }
.slot-summary-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--t2); margin-bottom: 7px; }
.slot-summary-pills { display: flex; flex-wrap: wrap; gap: 4px; min-height: 26px; }

/* ── CREATE LAYOUT (stacked: fields top, calendar bottom) ── */
.main-wide { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.create-layout { display: flex; flex-direction: column; gap: 1.5rem; }
.create-fields { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 1.25rem 1.5rem; }
.create-calendar { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: 1.25rem 1.5rem; }
.create-cal-inner { display: grid; grid-template-columns: 240px 1fr; gap: 1rem; align-items: start; }
.create-cal-widget { flex-shrink: 0; }
.create-cal-cards  { min-width: 0; }

/* 2-column form fields grid */
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
@media (max-width: 600px) { .fg-row { grid-template-columns: 1fr; } }

/* Participants horizontal grid (bottom of vote/admin) */
.participants-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px; margin-top: .75rem;
}
.participant-card {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--white); min-width: 0;
}

/* ── MANAGE TABLE ── */
.manage-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 4px; background: var(--white); }
.manage-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.manage-table thead tr { background: var(--gray-bg); }
.manage-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; color: var(--t3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.manage-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.manage-table tbody tr:last-child td { border-bottom: none; }
.manage-table tbody tr:hover td { background: #FAFAFA; }
.manage-title { font-weight: 600; color: var(--t1); }
.manage-desc  { font-size: 11px; color: var(--t3); margin-top: 2px; }
.manage-num   { text-align: center; font-weight: 600; color: var(--t1); }
.manage-link { font-size: 11px; padding: 4px 9px; border-radius: 3px; border: 1px solid var(--border); background: var(--white); color: var(--t1); text-decoration: none; cursor: pointer; font-family: var(--font); display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; transition: border-color .1s, color .1s; }
.manage-link:hover        { border-color: var(--t2); }
.manage-link-warn:hover   { border-color: orange; color: #b45309; }
.manage-link-danger:hover { border-color: var(--red); color: var(--red); }

/* ── HEADER GHOST BTN ── */
.header-btn-ghost { background: transparent; color: var(--t2); border: 1px solid var(--border); padding: 7px 14px; border-radius: 3px; font-size: 12px; cursor: pointer; font-family: var(--font); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; transition: color .15s, border-color .15s; }
.header-btn-ghost:hover { color: var(--red); border-color: var(--red); }

/* ── HEADER DROPDOWN ── */
.hdr-dropdown { position: relative; }
.hdr-dropdown-toggle { white-space: nowrap; }
.hdr-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 200px; z-index: 200;
  overflow: hidden;
}
.hdr-dropdown-menu.open { display: block; }
.hdr-dropdown-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; font-size: 13px; color: var(--t1);
  text-decoration: none; transition: background .1s;
}
.hdr-dropdown-item:hover { background: var(--gray-bg); color: var(--red); }

/* ── VOTER ROW WITH REMOVE ── */
.voter-row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }

/* ── DOODLE DATE/TIME GRID (create + admin slot editor) ── */
.doodle-layout { display: grid; grid-template-columns: 240px 1fr; gap: 1.25rem; align-items: start; }
.doodle-cal-panel { position: sticky; top: 76px; }
.doodle-grid-panel { min-width: 0; }
.doodle-grid-outer { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.doodle-grid-scroll { overflow-x: auto; }
.doodle-grid { display: flex; min-width: max-content; }
.doodle-time-col { position: sticky; left: 0; z-index: 3; background: var(--white); border-right: 2px solid var(--border); flex-shrink: 0; }
.doodle-date-col { flex-shrink: 0; width: 84px; border-right: 1px solid var(--border); }
.doodle-date-col:last-child { border-right: none; }
.doodle-col-head { text-align: center; padding: 10px 4px 8px; background: var(--gray-bg); border-bottom: 1px solid var(--border); user-select: none; height: 88px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.doodle-time-head { text-align: center; padding: 10px 8px 8px; background: var(--gray-bg); border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--t3); white-space: nowrap; user-select: none; height: 88px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.d-day-abbr { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--t2); }
.d-day-num  { font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--t1); }
.d-month    { font-size: 10px; color: var(--t2); text-transform: capitalize; }
.doodle-col-remove { display: block; margin: 5px auto 0; background: none; border: none; cursor: pointer; font-size: 11px; color: var(--t3); padding: 1px 6px; border-radius: 3px; line-height: 1.4; transition: color .1s, background .1s; }
.doodle-col-remove:hover { color: var(--red); background: var(--red-xl); }
.doodle-time-label { height: 38px; display: flex; align-items: center; justify-content: flex-end; padding: 0 10px; font-size: 11px; font-weight: 500; color: var(--t2); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; white-space: nowrap; transition: background .1s, color .1s; }
.doodle-time-label:last-child { border-bottom: none; }
.doodle-time-label:hover { background: var(--red-xl); color: var(--red-dark); }
.doodle-time-label.all-sel { color: var(--red-dark); font-weight: 700; }
.doodle-slot-cell { height: 38px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; transition: background .12s; }
.doodle-slot-cell:last-child { border-bottom: none; }
.doodle-slot-cell.unavail { background: var(--gray-bg); cursor: default; }
.doodle-slot-cell:hover:not(.unavail):not(.sel) { background: var(--red-xl); }
.doodle-slot-cell.sel { background: var(--red-xl); }
.d-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #D0D0D0; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: transparent; transition: all .12s; }
.doodle-slot-cell.sel .d-dot { background: var(--red); border-color: var(--red); color: #fff; }
.doodle-slot-cell:hover:not(.unavail):not(.sel) .d-dot { border-color: var(--red-light); }
.doodle-slot-cell.unavail .d-dot { border-color: #E8E8E8; }
.doodle-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 160px; color: var(--t3); font-size: 13px; gap: 8px; text-align: center; border: 1px dashed var(--border); border-radius: 4px; padding: 2rem; }
.doodle-empty .di { font-size: 28px; }
/* Inside admin slot editor, calendar is not sticky */
#addSlotsPanel .doodle-cal-panel { position: static; }
@media (max-width: 780px) { .doodle-layout { grid-template-columns: 1fr; } .doodle-cal-panel { position: static; } }

/* ── Large month-view calendar (Doodle-style) ── */
.cal-big { max-width: 800px; margin: 0 auto; }
.cal-big .cal-head { padding: 14px 20px; }
.cal-big .cal-head-month { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.cal-big .cal-nav-btn { font-size: 22px; width: 36px; height: 36px; border-radius: 50%; }
.cal-big .cal-body { padding: 0 8px 14px; }
.cal-big .cal-grid { gap: 3px; }
.cal-big .cal-dn {
  font-size: 10px; font-weight: 700; text-align: center;
  padding: 8px 4px 7px; color: var(--t3);
  text-transform: uppercase; letter-spacing: .5px;
}
.cal-big .cal-d {
  height: 72px; border-radius: 8px;
  font-size: 18px; font-weight: 400;
  border: 1px solid transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; line-height: 1;
  cursor: pointer; user-select: none;
  transition: background .12s, color .12s, border-color .12s;
}
.cal-big .cal-d:hover:not(.past):not(.empty) {
  background: var(--red-xl); color: var(--red-dark); border-color: var(--red-light);
}
.cal-big .cal-d.sel {
  background: var(--red) !important; color: #fff !important;
  font-weight: 700; border-color: var(--red-dark);
}
.cal-big .cal-d.sel::after { content: '✓'; font-size: 10px; font-weight: 600; opacity: .8; }
.cal-big .cal-d.today:not(.sel) {
  font-weight: 700; color: var(--red); border-color: var(--red-light); background: var(--red-xl);
}
.cal-big .cal-d.past  { color: #ccc; pointer-events: none; }
.cal-big .cal-d.empty { pointer-events: none !important; background: transparent !important; border: none !important; }
.cal-big .cal-d.nonwork:not(.sel) { background: var(--gray-bg); color: var(--t3); }
.cal-big .cal-d.has-slots:not(.sel) {
  font-weight: 700; color: var(--red-dark); background: var(--red-xl); border-color: var(--red-light);
}
/* Time grid section header */
.time-grid-section { margin-top: 1.75rem; }
.time-grid-section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--t2); margin-bottom: .6rem;
}
.time-grid-section-label::before,
.time-grid-section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Per-day time cards ── */
.day-cards-wrap { display: flex; flex-direction: column; gap: 10px; }
.day-card { border: 1px solid var(--border); border-radius: 8px; background: var(--white); overflow: hidden; }
.day-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--gray-bg); border-bottom: 1px solid var(--border);
}
.day-card-date { display: flex; align-items: baseline; gap: 6px; }
.day-card-abbr  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--t2); }
.day-card-num   { font-size: 22px; font-weight: 700; color: var(--t1); line-height: 1; }
.day-card-month { font-size: 12px; color: var(--t2); text-transform: capitalize; }
.day-card-remove {
  background: none; border: none; cursor: pointer; font-size: 14px; color: var(--t3);
  padding: 3px 7px; border-radius: 4px; transition: color .1s, background .1s; line-height: 1;
}
.day-card-remove:hover { color: var(--red); background: var(--red-xl); }
.day-card-slots {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 14px; min-height: 34px;
}
.day-card-hint { font-size: 11px; color: var(--t3); font-style: italic; align-self: center; }
.slot-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--red-xl); border: 1px solid var(--red-light); border-radius: 20px;
  padding: 4px 5px 4px 10px; font-size: 12px; font-weight: 500; color: var(--red-dark);
}
.slot-pill-dur { font-size: 10px; opacity: .7; font-weight: 400; }
.slot-pill-remove {
  background: none; border: none; cursor: pointer; font-size: 14px; line-height: 1;
  color: var(--red-light); padding: 0 4px; border-radius: 50%;
  transition: color .1s, background .1s; display: flex; align-items: center; justify-content: center;
}
.slot-pill-remove:hover { color: var(--red); background: rgba(0,0,0,.07); }
.day-card-form {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 12px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.day-card-form input[type="time"],
.day-card-form select {
  font-family: var(--font); font-size: 13px;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--white); color: var(--t1);
  padding: 6px 8px; outline: none; transition: border-color .1s;
}
.day-card-form input[type="time"]:focus,
.day-card-form select:focus { border-color: var(--red-light); }
.day-card-form input[type="time"] { width: 112px; }
.day-card-form select { max-width: 110px; }
.btn-add-slot {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--red); color: #fff; border: none; border-radius: 4px;
  padding: 7px 13px; font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .1s; white-space: nowrap;
}
.btn-add-slot:hover { background: var(--red-dark); }
@media (max-width: 600px) {
  .cal-big .cal-d { height: 46px; font-size: 14px; border-radius: 5px; }
  .cal-big .cal-d.sel::after { font-size: 9px; }
  .cal-big .cal-nav-btn { font-size: 18px; width: 30px; height: 30px; }
  .cal-big .cal-head { padding: 10px 14px; }
  .cal-big .cal-head-month { font-size: 15px; }
}

/* ── RESPONSIVE EXTRAS ── */
@media (max-width: 860px) {
  .create-cal-inner { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .slot-row-ro { grid-template-columns: 1fr 42px; }
  .manage-table-wrap { font-size: 12px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
}
