/* BEAUTINEL — shared styles */
:root {
  --mist: #EEF2EE;
  --surface: #FFFFFF;
  --ink: #1C2B27;
  --ink-soft: #5B6B66;
  --pine: #2E5B4F;
  --pine-deep: #214238;
  --blush: #EBCBC4;
  --berry: #A8475E;
  --amber: #E2B866;
  --sage: #B9CDB8;
  --line: #D5DDD7;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --font: "Readex Pro", "Segoe UI", Tahoma, Arial, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(80px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 500;
  background: var(--pine); color: #fff; transition: background .15s; text-decoration: none;
}
.btn:hover { background: var(--pine-deep); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: var(--berry); }
.btn-danger:hover { background: #8d3a4e; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); position: relative;
}

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pine); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }

/* Toast */
.toast {
  position: fixed; inset-inline: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  margin-inline: auto; width: fit-content; max-width: calc(100% - 32px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
  z-index: 100; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--berry); }

/* Overlay + drawer + modal */
.overlay { position: fixed; inset: 0; background: rgba(28, 43, 39, .45); z-index: 50; display: none; }
.overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(440px, 100%);
  background: var(--surface); z-index: 60; display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateX(100%); transition: transform .25s ease;
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: none !important; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot { padding: 18px 22px; border-top: 1px solid var(--line); }

.modal {
  position: fixed; inset: 0; z-index: 70; display: none; place-items: center; padding: 20px;
}
.modal.open { display: grid; }
.modal-card {
  background: var(--surface); border-radius: var(--radius-lg); width: min(760px, 100%);
  max-height: calc(100% - 40px); overflow-y: auto; position: relative;
}
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; }

.muted { color: var(--ink-soft); }
.hidden { display: none !important; }
.scroll-x { overflow-x: auto; }
