/* === BUTTONS === */

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--text);
  color: var(--page);
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-add:hover {
  transform: translateY(-1px);
  opacity: .92;
}

.btn-add:active {
  transform: translateY(0);
}

.btn-ghost {
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface-inset);
  color: var(--text);
  transition: background .15s;
  font-family: inherit;
}

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

.btn-ghost:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-primary {
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--text);
  color: var(--page);
  transition: transform .15s ease, opacity .15s ease;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  opacity: .92;
}

.btn-primary:active {
  transform: translateY(0);
}

/* Loading state: dim + block re-clicks while the save is in flight. */
.btn-primary.is-loading {
  cursor: wait;
  pointer-events: none;
  opacity: .65;
}

.btn-danger {
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #C0392B;
  color: #fff;
  transition: transform .15s ease, opacity .15s ease, background .15s ease;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
  transform: translateY(-1px);
  background: #A93226;
}

.btn-danger:active {
  transform: translateY(0);
}

.btn-danger.is-loading {
  cursor: wait;
  pointer-events: none;
  opacity: .65;
}

/* === DROPDOWN === */

.dd {
  position: relative;
  font-family: inherit;
}

.dd-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 34px 11px 36px;
  font-size: 12.5px;
  font-weight: 500;
  border: none;
  border-radius: 999px;
  background: var(--surface-inset);
  color: var(--text);
  cursor: pointer;
  outline: none;
  transition: background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
  font-family: inherit;
  text-align: left;
  min-width: 140px;
}

.dd-toggle:hover {
  background: var(--surface);
}

.dd.open .dd-toggle {
  background: var(--surface-strong);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, .16);
}

.dd-toggle::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text2);
  border-bottom: 1.5px solid var(--text2);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
  transition: transform .2s ease;
}

.dd.open .dd-toggle::after {
  transform: translateY(-25%) rotate(-135deg);
}

.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  background: var(--surface-solid);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  opacity: 0;
  transform: translateY(-6px) scale(.98);
  pointer-events: none;
  transform-origin: top left;
  transition: opacity .18s ease, transform .18s ease;
  max-height: 280px;
  overflow-y: auto;
}

.dd.open .dd-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dd-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
  font-family: inherit;
}

.dd-option:hover {
  background: var(--page-3);
}

.dd-option:focus-visible {
  background: var(--page-3);
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.dd-menu:focus-visible,
.picker-pop:focus-visible {
  outline: none;
  box-shadow: var(--shadow-lg);
}

.dd-option.selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.dd-option .dd-check {
  margin-left: auto;
  font-size: 14px;
  opacity: 0;
}

.dd-option.selected .dd-check {
  opacity: 1;
}

/* Inline cell picker — same as .dd-menu but always visible */
.picker-pop {
  position: absolute;
  z-index: 200;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  min-width: 180px;
}

/* === TABLE CELLS === */

.company-name {
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -.005em;
}

.role-text {
  font-size: 12.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
  display: inline-block;
  vertical-align: middle;
}

.loc-text {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text2);
  font-weight: 500;
}

.source-chip i {
  font-size: 14px;
}

.sal-val {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.005em;
}

.sal-none {
  font-size: 13px;
  color: var(--text3);
}

.cell-applydate {
  font-size: 12.5px;
  color: var(--text2);
  white-space: nowrap;
}

/* === STATUS BADGE === */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}

.status-badge i {
  font-size: 14px;
  line-height: 1;
}

.s-accepted  { background: #DBEBC0; color: #3B6D11; }
.s-rejected  { background: #F8D7D7; color: #A32D2D; }
.s-interview { background: #F6E0BD; color: #854F0B; }
.s-viewed    { background: #E4E0D2; color: #5F5E5A; }
.s-pending   { background: #F7D9E5; color: #993556; }

/* === INLINE EDIT CELLS === */

.cell-edit {
  cursor: text;
  border-radius: 8px;
  padding: 6px 10px;
  margin: -6px -10px;
  transition: background .15s ease, box-shadow .15s ease;
  display: inline-block;
  min-width: 60px;
  max-width: 280px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: middle;
}

.cell-edit:hover {
  background: var(--input-bg);
}

.cell-edit:focus {
  outline: none;
  background: var(--surface-solid);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, .18);
  white-space: normal;
  overflow: visible;
  max-width: none;
}

.cell-edit[data-empty="1"]:not(:focus)::before {
  content: attr(data-placeholder);
  color: var(--text3);
}

.cell-pick {
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 10px;
  margin: -6px -10px;
  transition: background .15s ease, box-shadow .15s ease;
  display: inline-block;
}

/* Grey hover fill for plain pickable cells — but NOT the status badge, which
   keeps its own colour (handled separately below). */
.cell-pick:not(.status-badge):hover {
  background: var(--input-bg);
}

.status-badge.cell-pick {
  /* Restore flex — .cell-pick's inline-block would kill the icon/text gap. */
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  transition: filter .15s ease, box-shadow .15s ease;
}

/* The badge keeps its own colour — on hover deepen it slightly and add a soft
   ring so it reads as interactive without a clashing grey background. */
.status-badge.cell-pick:hover {
  filter: brightness(.95);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .07);
}

.source-chip.cell-pick {
  /* Restore flex layout — .cell-pick's inline-block would otherwise kill the
     gap between the icon and the source name. */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin: -6px -10px;
}

.cell-date {
  position: relative;
  display: inline-block;
  border-radius: 8px;
  padding: 6px 10px;
  margin: -6px -10px;
  cursor: pointer;
  transition: background .15s ease;
}

.cell-date:hover {
  background: var(--input-bg);
}

.cell-date input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
  color-scheme: light;
}

/* === ACTION BUTTONS === */

.act-cell {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.act-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  color: var(--text2);
  font-size: 15px;
  transition: background .15s, color .15s, transform .12s ease;
  display: flex;
  align-items: center;
}

.act-btn:active {
  transform: scale(.88);
}

.act-btn.del:hover {
  background: #F8D7D7;
  color: #A32D2D;
}

/* === CALENDAR POPUP === */

.cal-pop {
  position: absolute;
  z-index: 200;
  background: var(--surface-solid);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
  width: 280px;
  font-family: inherit;
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

.cal-nav {
  display: flex;
  gap: 2px;
}

.cal-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, color .12s;
  font-family: inherit;
  font-size: 14px;
}

.cal-btn:hover {
  background: var(--page-3);
  color: var(--text);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-dow {
  font-size: 10px;
  text-align: center;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 6px 0;
}

.cal-day {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  height: 32px;
  border-radius: 8px;
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text);
  transition: background .12s, color .12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day:hover {
  background: var(--page-3);
}

.cal-day.muted {
  color: var(--text3);
}

.cal-day.today {
  font-weight: 700;
  color: var(--accent);
}

.cal-day.selected {
  background: var(--accent);
  color: #fff;
}

.cal-day.selected:hover {
  background: var(--accent-2);
}

.cal-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
}

.cal-foot button {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: var(--page-3);
  color: var(--text);
  transition: background .12s;
}

.cal-foot button:hover {
  background: var(--page-hover);
}

/* === NUMBER INPUT === */

.num-input {
  display: flex;
  align-items: center;
  background: var(--input-bg);
  border-radius: 12px;
  width: 100%;
  position: relative;
  transition: background .18s ease, box-shadow .18s ease;
}

.num-input input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 11px 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 0;
  text-align: left;
}

.num-input input::-webkit-outer-spin-button,
.num-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.num-input input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.num-input:focus-within {
  background: var(--input-bg-focus);
}

/* === CHECKBOX === */

.chk {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--input-bg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .1s ease;
  position: relative;
  vertical-align: middle;
}

.chk:hover {
  background: var(--input-bg-focus);
}

.chk:checked {
  background: var(--accent);
}

.chk:checked::after {
  content: "";
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
}

.chk:disabled {
  opacity: .5;
  cursor: wait;
}

/* === MODAL === */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(40, 30, 15, .32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn .2s ease;
}

/* Closing state: overlay fades + dialog scales down, then JS hides it. */
.modal-overlay.closing {
  animation: fadeOut .18s ease forwards;
}

.modal-overlay.closing .modal {
  animation: popOut .18s cubic-bezier(.4, 0, 1, 1) forwards;
}

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

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

@keyframes popOut {
  from { opacity: 1; transform: translateY(0)  scale(1);   }
  to   { opacity: 0; transform: translateY(6px) scale(.98); }
}

.modal {
  background: var(--surface-solid);
  border-radius: var(--radius-xl);
  width: 560px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: popIn .25s cubic-bezier(.4, 0, .2, 1);
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)  scale(1);   }
}

.modal-header {
  padding: 1.4rem 1.6rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.modal-close {
  background: var(--surface-inset);
  border: none;
  cursor: pointer;
  padding: 7px;
  border-radius: 50%;
  color: var(--text2);
  font-size: 16px;
  display: flex;
  transition: background .15s, color .15s;
}

.modal-close:hover {
  background: var(--surface);
  color: var(--text);
}

.modal-body {
  padding: .5rem 1.6rem 1.25rem;
  flex: 0 0 auto;
  overflow: visible;
}

.modal-footer {
  padding: 1rem 1.6rem 1.4rem;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

/* === FORM === */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fg-full {
  grid-column: 1 / -1;
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fg label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.fg input,
.fg textarea {
  font-size: 13.5px;
  padding: 11px 13px;
  border: none;
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  width: 100%;
  transition: background .18s ease, box-shadow .18s ease;
  font-family: inherit;
  appearance: none;
}

.fg input:focus,
.fg textarea:focus {
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, .18);
}

.fg textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.55;
}

.fg .dd {
  width: 100%;
}

.fg .dd-toggle,
.date-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 11px 34px 11px 13px;
  font-size: 13.5px;
  font-weight: 500;
  background: var(--input-bg);
  border-radius: 12px;
  min-width: 0;
  color: var(--text);
}

.date-toggle {
  position: relative;
}

.date-toggle::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--text2);
  border-bottom: 1.5px solid var(--text2);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}

.fg .dd-toggle:hover,
.date-toggle:hover {
  background: var(--input-bg-focus);
}

.fg .dd.open .dd-toggle {
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px rgba(83, 74, 183, .18);
}

@media (max-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* === LOGIN OVERLAY === */

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

/* Set by the inline head script when a valid session already exists.
   Shows the app and hides the login screen from the first paint, so a
   refresh while signed in doesn't flash the login overlay. */
html.is-authed .login-overlay { display: none; }
html.is-authed #app.app-hidden { display: block !important; }

.login-card {
  position: relative;
  z-index: 1;
  background: var(--surface);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border-radius: var(--radius-xl);
  padding: 48px 40px 40px;
  width: 420px;
  max-width: 100%;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--text);
  color: var(--page);
  font-size: 24px;
  margin-bottom: 20px;
}

.login-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 28px;
}

#gisBtn {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* While verifying the session, hide the Google button and show a status line. */
.login-card.is-verifying #gisBtn {
  display: none;
}

.login-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  font-size: 13px;
  color: var(--text2);
}

.login-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid var(--text3);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .login-spinner { animation-duration: 1.2s; }
}

/* === USER BADGE === */

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  min-width: 0;
}

.user-badge img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: block;
  flex: 0 0 auto;
}

.user-name {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* On narrow screens drop the name to a tappable avatar + sign-out only,
   so the Add button keeps its space in the topbar. */
@media (max-width: 640px) {
  .user-name {
    max-width: 110px;
  }
}

@media (max-width: 420px) {
  .user-name {
    display: none;
  }
}

.user-badge button {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  font-size: 14px;
}

.user-badge button:hover {
  background: var(--surface-strong);
  color: var(--text);
}

/* === UTILITY === */

.app-hidden {
  display: none !important;
}

/* Visually hidden but available to assistive tech */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === OFFLINE BANNER === */

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  background: #A32D2D;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
}

.offline-banner[hidden] {
  display: none;
}

.offline-banner i {
  font-size: 16px;
}

/* === TOAST === */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease, toastOut .25s ease 3.75s forwards;
  pointer-events: none;
}

.toast--error {
  background: #F8D7D7;
  color: #A32D2D;
}

.toast--success {
  background: #DBEBC0;
  color: #3B6D11;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);   }
}

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

/* === ICON BUTTON (topbar settings) === */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--surface);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  color: var(--text2);
  font-size: 18px;
  box-shadow: var(--shadow-sm);
  transition: background .15s ease, color .15s ease, transform .12s ease;
  flex: 0 0 auto;
}

.icon-btn:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(.92);
}

.icon-btn[hidden] {
  display: none;
}

.icon-btn--danger:hover {
  background: #F8D7D7;
  color: #A32D2D;
}

:root[data-theme="dark"] .icon-btn--danger:hover {
  background: rgba(163, 45, 45, .2);
  color: #f5a5a5;
}

/* === SETTINGS MODAL === */

.modal-sm {
  width: 440px;
}

/* === CONFIRM (DELETE) MODAL === */

.modal-confirm .modal-body {
  text-align: center;
  padding: 1.8rem 1.6rem 1.25rem;
}

.confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #F8D7D7;
  color: #A32D2D;
  font-size: 24px;
  margin-bottom: 16px;
}

.confirm-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 8px;
}

.confirm-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text2);
}

.modal-confirm .modal-footer {
  justify-content: center;
}

:root[data-theme="dark"] .confirm-icon {
  background: rgba(163, 45, 45, .2);
  color: #f5a5a5;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

/* Segmented control (language / theme) */
.seg {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-inset);
}

.seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text2);
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}

.seg-btn i {
  font-size: 15px;
}

.seg-btn:hover {
  color: var(--text);
}

/* Selected pill: high-contrast inverted fill (white-on-dark / dark-on-light)
   so the active choice is unmistakable in both themes. */
.seg-btn[aria-checked="true"] {
  background: var(--text);
  color: var(--page);
  box-shadow: var(--shadow-sm);
}

.seg-btn[aria-checked="true"]:hover {
  color: var(--page);
}

/* === DARK THEME COMPONENT OVERRIDES === */

:root[data-theme="dark"] .cell-date input { color-scheme: dark; }
:root[data-theme="dark"] .toast--error    { background: rgba(163, 45, 45, .2);  color: #f5a5a5; }
:root[data-theme="dark"] .toast--success  { background: rgba(99, 153, 34, .2);  color: #9dd160; }
:root[data-theme="dark"] .act-btn.del:hover { background: rgba(163, 45, 45, .25); color: #f5a5a5; }
