@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap");

:root {
  --ink: #0f172a;
  --slate: #1f2937;
  --muted: #475569;
  --cream: #fff7de;
  --sand: #f9e7b7;
  --accent: #f1c232;
  --accent-2: #f6d88a;
  --accent-rgb: 241, 194, 50;
  --accent-dark: #d19e18;
  --btn-primary-bg: var(--accent);
  --btn-primary-fg: #ffffff;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-fg: var(--slate);
  --btn-secondary-border: var(--line);
  --btn-secondary-hover-bg: rgba(15, 23, 42, 0.04);
  --button-radius: 999px;
  --line: rgba(15, 23, 42, 0.12);
  --surface: rgba(255, 255, 255, 0.86);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: #ffffff;
  min-height: 100vh;
}

html[lang^="he"] body {
  font-family: Arial, "Segoe UI", sans-serif;
}

html[lang^="he"] h1,
html[lang^="he"] h2,
html[lang^="he"] h3,
html[lang^="he"] h4,
html[lang^="he"] h5,
html[lang^="he"] h6,
html[lang^="he"] .brand h1,
html[lang^="he"] .card-title,
html[lang^="he"] .section-title {
  font-family: Arial, "Segoe UI", sans-serif;
}

#app {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-areas: "sidebar main";
  min-height: 100vh;
}

.app-shell.collapsed {
  grid-template-columns: 80px 1fr;
}

.sidebar {
  grid-area: sidebar;
  padding: 16px;
  border-right: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
}

.brand-logo img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: white;
}

.brand-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 20px rgba(var(--accent-rgb), 0.3);
}

.brand-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.sidebar-toggle {
  margin-left: auto;
  padding: 6px 10px;
  font-size: 12px;
}

.app-shell.collapsed .brand {
  flex-direction: column;
  align-items: center;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-section + .nav-section {
  margin-top: 8px;
}

.nav-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 12px;
}

.nav-group {
  padding: 10px 0;
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--slate);
}

.nav a.nav-group {
  font-size: 16px;
  font-weight: 700;
  padding: 10px 0;
}

.nav a.nav-group.nav-item {
  padding: 10px 0;
}

.nav a {
  text-decoration: none;
  color: var(--slate);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a.nav-item {
  font-size: 14px;
  font-weight: 400;
  padding-inline-start: 3em;
  padding-block: 10px;
  padding-inline-end: 0;
}

.nav-short {
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
}

.nav-short svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav a.active {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--ink);
  border: 1px solid rgba(var(--accent-rgb), 0.45);
}

.nav a:hover {
  color: var(--accent);
}

.icon-only {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-only .icon {
  margin: 0;
}

.app-shell.collapsed .nav-title {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.logout-btn {
  align-self: flex-start;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--slate);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.user-card:hover {
  background: rgba(15, 23, 42, 0.04);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
}

.user-role {
  font-size: 12px;
  color: var(--muted);
}

.user-email {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.main {
  grid-area: main;
  padding: 9px 10px 14px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 28px;
}

.topbar h1 {
  font-family: "Playfair Display", serif;
  font-size: 30px;
  margin: 0;
}

.surface {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 4px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  padding: 18px;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
}

.muted,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.card-title {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.card-value {
  font-size: 24px;
  font-weight: 600;
  margin-top: 10px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

html[dir="rtl"] .table,
[dir="rtl"] .table {
  direction: rtl;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
  text-align: right;
}

.table th {
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 12px;
  color: var(--muted);
}

.table th.sortable {
  cursor: pointer;
  user-select: none;
}

.table th.sortable::after {
  content: "↕";
  font-size: 10px;
  margin-inline-start: 6px;
  opacity: 0.4;
}

.table th.sortable.sorted.asc::after {
  content: "▲";
  opacity: 0.8;
}

.table th.sortable.sorted.desc::after {
  content: "▼";
  opacity: 0.8;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.static-value {
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--slate);
  font-size: 14px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.address-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.session-header-fields {
  margin-bottom: 16px;
}

.markdown-field textarea {
  min-height: 90px;
}

.markdown-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.markdown-split textarea {
  min-height: 140px;
}

.markdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.markdown-preview {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.8);
  font-size: 13px;
  color: var(--slate);
}

.markdown-split .markdown-preview {
  margin-top: 0;
}

.markdown-preview a {
  color: var(--accent);
  text-decoration: underline;
}

.weekday-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.weekday-pill {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 13px;
  color: var(--slate);
  cursor: pointer;
}

.weekday-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.weekday-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
  min-height: 32px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.weekday-pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.28);
}

.sex-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sex-pill {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 13px;
  color: var(--slate);
  cursor: pointer;
}

.sex-pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.sex-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
  min-height: 32px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.sex-pill input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 8px 18px rgba(var(--accent-rgb), 0.28);
}

.tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}

.tag-input input {
  flex: 1;
  min-width: 120px;
  border: none;
  padding: 6px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--slate);
  font-size: 12px;
}

.tags-inline .tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-field input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-field input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 999px;
}

.color-field input[type="color"]::-moz-color-swatch {
  border: none;
  border-radius: 999px;
}

.color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid var(--line);
}

.tag-remove {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-family: inherit;
}

.color-field {
  display: grid;
  grid-template-columns: 48px 24px 1fr auto;
  gap: 10px;
  align-items: center;
}

.color-input {
  padding: 0;
  height: 42px;
  width: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  cursor: pointer;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.color-input::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}

.color-input::-moz-color-swatch {
  border: none;
  border-radius: 10px;
}

.color-chip {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.color-text {
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.color-reset {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
}

select[multiple] {
  min-height: 120px;
}

button {
  padding: 10px 16px;
  border-radius: var(--button-radius);
  border: 1px solid transparent;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

button.secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
  border-color: var(--btn-secondary-border);
}

button.secondary:hover,
.icon-button:hover,
.nav-arrow:hover,
.circle-button:hover {
  background: var(--btn-secondary-hover-bg);
}

button.modal-close {
  background: white;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
}

button.modal-close::before,
button.modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

button.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

button.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

button:hover {
  transform: translateY(-2px);
}

button.modal-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--btn-secondary-border);
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-fg);
}

.icon-button .icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

button .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button .icon svg {
  width: 16px;
  height: 16px;
}

.circle-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
  box-shadow: none;
}

.circle-button .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.notice {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.1);
  color: var(--slate);
  margin-bottom: 16px;
}

.toolbar {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar button {
  height: 44px;
  min-width: 120px;
}

.toolbar .import-card {
  height: 44px;
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.toolbar-users button,
.toolbar-users select,
.toolbar-guests button,
.toolbar-customers button {
  height: 44px;
  min-width: 140px;
  justify-content: center;
}

.toolbar-users .user-filters select {
  min-width: 160px;
  flex: 0 0 160px;
}

.toolbar-users button,
.toolbar-guests button {
  flex: 0 0 160px;
}

.toolbar-customers button {
  flex: 0 0 160px;
}

.toolbar-customers .import-card {
  flex: 0 0 200px;
}

.toolbar .import-subtitle {
  display: none;
}

.user-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.user-filters select {
  height: 44px;
}

.user-filters button {
  height: 44px;
  min-width: 120px;
}

.btn-icon .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.btn-edit {
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.18);
}

.btn-danger .icon svg {
  stroke: currentColor;
  fill: none;
}
.customer-controls {
  margin: 20px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.details-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.details-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.details-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.details-main,
.details-activity {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.details-section {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.details-section:last-child {
  border-bottom: none;
}

.details-section h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 15px;
}

.details-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.activity-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-form textarea {
  min-height: 80px;
}

.activity-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .details-columns {
    grid-template-columns: 1fr;
  }
}

.details-list {
  display: grid;
  gap: 8px;
}

.details-list .label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  min-width: 90px;
}

.details-table th {
  font-size: 11px;
}

.customer-controls input[type="search"] {
  max-width: 240px;
}

.bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-controls {
  margin: 16px 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.audit-controls > div {
  min-width: 160px;
}

.audit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-clear {
  margin-top: 8px;
}

.billing-toolbar {
  margin: 16px 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}

.billing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.billing-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  flex: 1;
}

.billing-range-guard {
  display: flex;
  align-items: flex-end;
}

.billing-range-guard .checkbox {
  font-size: 12px;
  color: var(--muted);
}

.billing-section {
  margin-bottom: 24px;
}

.billing-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.row-muted {
  opacity: 0.6;
}

.link-muted {
  font-size: 12px;
  margin-left: 8px;
  color: var(--muted);
  text-decoration: none;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(280px, 440px);
  justify-content: center;
  padding: 80px 16px;
}

.login-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-family: "Playfair Display", serif;
  margin-top: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  font-size: 12px;
}

.tag-accent {
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--ink);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
}

.tag-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.calendar-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.calendar-grid {
  width: 100%;
}

.calendar-views-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-inline-start: auto;
  flex: 0 0 auto;
}

.calendar-views {
  display: flex;
  gap: 8px;
}

.calendar-views button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  min-width: 32px;
}

.calendar-views button.active {
  background: var(--accent);
  color: white;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.calendar-nav button {
  height: 40px;
  min-width: 32px;
}

.nav-arrow {
  height: 40px;
  width: 40px;
  min-width: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
}

.nav-arrow .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.calendar-nav .date-input {
  max-width: 170px;
  height: 40px;
}

.calendar-actions-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-start;
  overflow: visible;
  min-width: 0;
  width: 100%;
}

.calendar-actions-main {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
  flex-wrap: wrap;
}

.calendar-actions-main,
.calendar-nav,
.calendar-views-stack {
  align-self: flex-start;
}

.calendar-actions-row #add-session {
  white-space: nowrap;
  flex-shrink: 0;
}

.calendar-actions-row button {
  height: 40px;
  min-width: 32px;
}

.calendar-export {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.calendar-export .icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calendar-export .icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.export-btn {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.export-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.calendar-actions-main input[type="search"] {
  min-width: 0;
  flex: 1 1 240px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 8px 14px;
  background: white;
  height: 40px;
}

@media (max-width: 1100px) {
  .calendar-actions-row {
    flex-wrap: wrap;
  }
}

.calendar-range {
  font-weight: 600;
  color: var(--slate);
  display: flex;
  align-items: center;
  gap: 10px;
}

[dir="rtl"] .calendar-nav .nav-arrow .icon svg {
  transform: scaleX(-1);
}

[dir="rtl"] .calendar-views-stack {
  align-items: flex-end;
}

[dir="rtl"] .calendar-range {
  justify-content: flex-end;
}

[dir="rtl"] .calendar-actions-row {
  direction: rtl;
}

.calendar-week-number {
  background: rgba(15, 23, 42, 0.08);
  color: var(--slate);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.calendar-hebrew {
  color: var(--muted);
  font-size: 12px;
}

.calendar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-stats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}


.stat-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

.calendar-day-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--ink);
  padding: 6px 12px;
  border-bottom: 2px solid var(--accent);
}

.calendar-day {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.calendar-events {
  display: grid;
  gap: 12px;
}

.calendar-event {
  background: white;
  border: 1px solid var(--line);
  border-left-width: 1px;
  border-left-color: var(--line);
  border-radius: 14px;
  padding: 6px;
  padding-inline-start: 6px;
  padding-inline-end: 6px;
  cursor: pointer;
  position: relative;
  font-size: 13px;
}

.calendar-event::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--series-color, var(--line));
  border-radius: 14px 0 0 14px;
}

.calendar-event.holiday {
  background: rgba(254, 243, 199, 0.7);
  cursor: default;
}

.calendar-event.holiday::before {
  background: var(--series-color, var(--accent));
}

.event-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  padding: 2px;
  border-radius: 8px;
  box-shadow: none;
}

.event-share {
  position: absolute;
  top: 38px;
  right: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  padding: 2px;
  border-radius: 8px;
  box-shadow: none;
}

.event-actions .icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.event-share .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.event-actions:hover {
  border-color: var(--line);
  color: var(--slate);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.event-share:hover {
  border-color: var(--line);
  color: var(--slate);
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
}

.calendar-event.birthday .event-actions,
.calendar-event.birthday .event-share {
  display: none;
}

.calendar-event.has-rail {
  padding-inline-end: 44px;
}

.event-actions-rail {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  border-radius: 10px;
}

.event-actions-rail .event-actions,
.event-actions-rail .event-share {
  position: static;
  top: auto;
  right: auto;
  width: 32px;
  height: 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.9);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  box-shadow: none;
}

.event-actions-rail .event-actions:hover,
.event-actions-rail .event-share:hover {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--slate);
  box-shadow: none;
}

.calendar-event.has-birthday-list .event-title {
  justify-content: space-between;
}

.calendar-event.has-birthday-list .birthday-chevron {
  margin-inline-start: auto;
}

.event-actions-menu {
  position: absolute;
  min-width: 160px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.14);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.event-actions-menu button {
  border: none;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink);
}

.event-actions-menu button:hover {
  background: rgba(var(--accent-rgb), 0.12);
}

.calendar-event.dragging {
  opacity: 0.55;
}

.calendar-event.past {
  opacity: 1;
  color: #4b5563;
}

.calendar-event.past::before {
  opacity: 0.45;
}

.calendar-event.compact {
  padding: 8px;
}

.calendar-event.cancelled {
  opacity: 0.6;
  border-style: dashed;
}

.calendar-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.calendar-event.holiday:hover {
  transform: none;
  box-shadow: none;
}

.calendar-event.mini {
  display: flex;
  gap: 6px;
  font-size: 12px;
  border-left-width: 3px;
}

[dir="rtl"] .calendar-event {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

[dir="rtl"] .calendar-event.holiday {
  border-right-color: var(--line);
}

[dir="rtl"] .calendar-event::before {
  left: auto;
  right: 0;
  border-radius: 0 14px 14px 0;
}

[dir="rtl"] .calendar-event.mini {
  border-left-width: 1px;
  border-right-width: 3px;
}

[dir="rtl"] .event-actions {
  right: auto;
  left: 8px;
}

[dir="rtl"] .event-share {
  right: auto;
  left: 8px;
}

[dir="rtl"] .event-actions-rail {
  right: auto;
  left: 8px;
  border: 0;
  border-radius: 10px;
}

[dir="rtl"] .event-actions-menu button {
  text-align: right;
}

.calendar-list {
  margin-top: 8px;
}

.calendar-list .table tr.holiday-row {
  background: rgba(254, 243, 199, 0.6);
}

.event-time {
  font-weight: 600;
  font-size: 12px;
}

.event-title {
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.event-icon-inline {
  font-size: 16px;
  line-height: 1;
}

.event-icon-corner {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 18px;
  opacity: 0.9;
}

.birthday-chevron {
  margin-inline-start: 8px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--slate);
  flex: 0 0 18px;
  line-height: 1;
}

.birthday-chevron svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2px;
  display: block;
}

.event-icon {
  margin-right: 6px;
}

.event-meta {
  font-size: 11px;
  color: var(--muted);
}

.event-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}

.event-meta-compact {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.remote-summary {
  opacity: 0.7;
  font-size: 10px;
}

.calendar-time-grid {
  --hour-row-height: 72px;
  --hour-count: 17;
  --hour-top-gap: 36px;
}

.calendar-day-view {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}

.calendar-hours {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-top: var(--hour-top-gap);
  color: var(--muted);
  font-size: 10px;
  gap: 0;
}

[dir="rtl"] .calendar-hours {
  align-items: flex-start;
}

.calendar-hour {
  height: var(--hour-row-height);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 11px;
}

.calendar-time-grid .calendar-day-events,
.calendar-time-grid .calendar-events {
  min-height: calc(var(--hour-row-height) * var(--hour-count) + var(--hour-top-gap));
  padding-top: var(--hour-top-gap);
  gap: 0;
  position: relative;
  display: block;
  background-image: none;
}

body.calendar-dragging .calendar-time-grid .calendar-day-events,
body.calendar-dragging .calendar-time-grid .calendar-events {
  background-image:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.4) 1px, transparent 1px);
  background-size: 100% calc(var(--hour-row-height) / 2), 100% var(--hour-row-height);
  background-position: 0 var(--hour-top-gap), 0 var(--hour-top-gap);
  background-repeat: repeat;
}

.calendar-time-grid .calendar-event {
  height: calc(var(--hour-row-height) * (var(--event-duration, 60) / 60));
  min-height: calc(var(--hour-row-height) * (var(--event-duration, 60) / 60));
  margin: 0;
  box-sizing: border-box;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 2px;
  padding: 8px;
  padding-inline-start: 8px;
  padding-inline-end: 8px;
  overflow: hidden;
  background: #fff;
  position: absolute;
  left: 0;
  right: 0;
}

.calendar-time-grid .calendar-event.timed {
  top: calc(var(--hour-top-gap) + (var(--event-start, 0) * var(--hour-row-height) / 60));
  z-index: 1;
}

.calendar-time-grid .calendar-event.birthday,
.calendar-time-grid .calendar-event.holiday {
  min-height: 36px;
}

.calendar-time-grid .calendar-event.all-day {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 36px;
  z-index: 2;
}


.calendar-week {
  display: grid;
  grid-template-columns: 48px repeat(7, minmax(160px, 1fr));
  gap: 8px;
  overflow-x: auto;
  flex: 1;
}

.calendar-day-column {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-dropzone.drag-over {
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18) inset;
}

.calendar-day-column.today {
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.15) inset;
}

.calendar-day-label {
  display: flex;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 12px;
  color: var(--muted);
  padding: 0;
  align-items: center;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.calendar-day-label .date {
  font-weight: 600;
  color: var(--ink);
}

.calendar-day-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.empty-slot {
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

.calendar-month {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-x: auto;
  flex: 1;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 12px;
  color: var(--muted);
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  gap: 8px;
}

.calendar-month-day {
  min-height: 130px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-month-day.muted {
  opacity: 0.5;
}

.calendar-month-day.today {
  border-color: rgba(14, 165, 233, 0.6);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.15) inset;
}

.date-number {
  font-weight: 600;
  font-size: 13px;
}

.calendar-month-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.more-events {
  font-size: 11px;
  color: var(--muted);
}

.empty-state {
  padding: 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  font-size: 14px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 50;
  padding: 20px;
  overflow-y: auto;
}

#icon-picker-modal {
  z-index: 70;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 20px;
  max-width: 980px;
  width: 100%;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal-compact {
  max-width: 560px;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-inline-end: 4px;
}

.modal.modal-scroll {
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.modal-header h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.link-button {
  border: none;
  background: none;
  color: var(--primary);
  padding: 0;
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.meta-sep {
  color: var(--muted);
  margin: 0 4px;
}

.birthday-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.15);
  color: #b45309;
  margin-left: 6px;
}

.birthday-badge svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.calendar-event.birthday {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(254, 243, 199, 0.7);
}

.calendar-list .birthday-row {
  background: rgba(254, 243, 199, 0.45);
}

.instructor-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}

.instructor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  overflow: hidden;
}

.instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instructor-name {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

.instructor-actions {
  margin-top: 8px;
}

.description-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.attachments {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attachments h4 {
  margin: 0;
  font-size: 15px;
}

.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.attachment-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.attachment-name {
  font-weight: 600;
}

.attachment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.roster {
  display: grid;
  gap: 12px;
}

.contact-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.roster-remove {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
}

.roster-remove .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
}

.contact-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--slate);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  padding: 0;
}

.contact-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-cell {
  display: flex;
  flex-direction: column;
}

.customer-name {
  font-weight: 600;
}

.customer-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}


.recipient-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.recipient-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.04);
  font-size: 12px;
  color: var(--slate);
}

.recipient-pill .recipient-meta {
  font-size: 11px;
  color: var(--muted);
}

.birthday-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.birthday-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.birthday-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.birthday-name {
  font-weight: 600;
  color: var(--ink);
}

.contact-icon.phone {
  border-color: rgba(14, 165, 233, 0.35);
  color: #0284c7;
}

.contact-icon.email {
  border-color: rgba(59, 130, 246, 0.35);
  color: #2563eb;
}

.contact-icon.whatsapp {
  border-color: rgba(34, 197, 94, 0.35);
  color: #16a34a;
}

.contact-icon.sms {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: #d97706;
}

.contact-icon.disabled {
  opacity: 0.35;
  pointer-events: none;
}

.modal-columns {
  display: grid;
  gap: 16px;
}

.modal-column-registration {
  display: grid;
  gap: 16px;
}

.modal-column-details .form-grid {
  grid-template-columns: 1fr;
}

.registrations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.registrations-header h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.registration-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.registration-hint {
  margin-top: 4px;
}

.registration-lookup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.registration-lookup-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.registration-lookup-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.registration-lookup-row .attendance-select {
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 6px 12px;
  background: white;
  color: var(--slate);
  min-width: 140px;
}

.registration-lookup-row .add-inline {
  flex-shrink: 0;
}

.add-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
}

.add-inline .icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.add-inline .add-label {
  font-size: 12px;
  font-weight: 600;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

.share-row label {
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.share-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.share-buttons {
  grid-template-columns: auto auto;
  justify-content: flex-start;
}

.share-field input {
  background: #fff7e6;
  border-color: rgba(15, 23, 42, 0.12);
}

@media (min-width: 720px) {
  .share-field {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
  }

  .share-field.share-buttons {
    grid-template-columns: auto auto;
  }
}

@media (max-width: 840px) {
  .markdown-split {
    grid-template-columns: 1fr;
  }
}

.roster h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--muted);
}

.roster-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.roster-select-all {
  white-space: nowrap;
  max-width: 100%;
}

.roster-actions-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.session-description {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(241, 194, 50, 0.12);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.role-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-button input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.import-card {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--slate);
  cursor: pointer;
  min-width: 190px;
}

.import-card input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.import-card.drag-over {
  border-color: rgba(var(--accent-rgb), 0.6);
  background: rgba(var(--accent-rgb), 0.08);
}

.import-title {
  font-weight: 600;
}

.import-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.role-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  cursor: pointer;
  font-size: 13px;
}

.role-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  margin: 0;
  appearance: none;
}

.role-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--slate);
  transition: all 0.2s ease;
  min-width: 92px;
}

.role-pill:hover span {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--ink);
}

.role-pill input:checked + span {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--ink);
  box-shadow: 0 8px 16px rgba(var(--accent-rgb), 0.18);
}

.registration-form {
  display: grid;
  gap: 12px;
}

@media (min-width: 980px) {
  .modal-columns {
    grid-template-columns: minmax(0, 0.3fr) minmax(0, 0.7fr);
    align-items: start;
  }
}

.attendance-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.attendance-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.attendance-btn svg {
  width: 16px;
  height: 16px;
}

.attendance-btn.active {
  color: var(--accent-dark);
  border-color: rgba(var(--accent-rgb), 0.5);
  background: #fff;
  border: 1px solid var(--line);
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-actions .primary-action {
  margin-inline-start: auto;
}

.calendar-actions-row button {
  white-space: nowrap;
}

#calendar-today {
  height: 40px;
  min-width: 64px;
  border-radius: 999px;
}

#add-session {
  height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
}

.export-menu {
  position: relative;
}

.export-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  z-index: 5;
}

[dir="rtl"] .export-options {
  right: auto;
  left: 0;
}

.export-options button {
  justify-content: flex-start;
}

.user-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-upload {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.attachment-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  background: rgba(15, 23, 42, 0.04);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.attachment-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.attachment-dropzone.drag-over {
  border-color: rgba(var(--accent-rgb), 0.7);
  background: rgba(var(--accent-rgb), 0.12);
}

.dropzone-content {
  display: grid;
  gap: 6px;
  align-items: center;
  justify-items: center;
  color: var(--slate);
}

.dropzone-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--accent);
}

.dropzone-title {
  font-weight: 600;
}

.dropzone-subtitle {
  font-size: 12px;
  color: var(--muted);
}

.attachment-empty {
  padding: 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center;
}

.attachment-empty-icon svg {
  width: 26px;
  height: 26px;
  fill: var(--muted);
}

.attachment-empty-title {
  font-weight: 600;
}

.logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px dashed var(--line);
  min-height: 72px;
  background: rgba(255, 255, 255, 0.6);
}

.logo-preview img {
  max-height: 64px;
  max-width: 100%;
  object-fit: contain;
}

.plan-picker {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.plan-options {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.plan-pill {
  position: relative;
  display: flex;
  cursor: pointer;
  cursor: pointer;
  transition: all 0.2s ease;
}

.plan-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-pill > span {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.plan-pill .plan-name {
  font-weight: 600;
  color: var(--ink);
}

.plan-pill .plan-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-inline-start: 6px;
}

.icon-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-field input[type="hidden"] {
  display: none;
}

.icon-preview {
  font-size: 16px;
  color: var(--ink);
}

.icon-preview.is-empty {
  color: var(--muted);
}

.icon-picker-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-picker-button .icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
}

.icon-picker-button .icon-preview.is-empty {
  display: none;
}

.icon-picker-button .icon-preview:not(.is-empty) ~ .icon-fallback {
  display: none;
}

.icon-picker-modal .icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(36px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.icon-picker-modal .icon-option {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.icon-picker-modal .icon-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.icon-picker-trigger {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  color: var(--slate);
}

.event-actions-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-actions-menu .icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2px;
}

.plan-pill:hover {
  color: var(--ink);
}

.plan-pill:hover > span {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.08);
}

.plan-pill input:checked + span {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--ink);
}

.room-remote-fields {
  display: block;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid var(--line);
}

.logo-placeholder {
  font-size: 12px;
  color: var(--muted);
}

.avatar-preview {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  min-height: 96px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.6);
}

.avatar-preview img {
  max-height: 96px;
  max-width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.toast-root {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(220, 252, 231, 0.9);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(254, 226, 226, 0.95);
}

.toast-info {
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(224, 242, 254, 0.9);
}

.theme-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.holiday-section {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.holiday-section h4 {
  margin: 0 0 12px;
  font-size: 15px;
}

.holiday-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.theme-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-card h4 {
  margin: 0;
  font-size: 15px;
}

.theme-fields {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.app-shell.collapsed .sidebar {
  padding: 24px 12px;
  align-items: center;
}

.app-shell.collapsed .brand-text,
.app-shell.collapsed .nav-label,
.app-shell.collapsed .nav-group:not(.nav-header),
.app-shell.collapsed .user-meta,
.app-shell.collapsed .sidebar-footer .tag {
  display: none;
}

.app-shell.collapsed .nav-short {
  display: inline-flex;
}

.app-shell.collapsed .nav a {
  justify-content: center;
  padding: 10px;
  width: 100%;
}

.app-shell.collapsed .nav {
  align-items: center;
}

.app-shell.collapsed .nav-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.app-shell.collapsed .nav-header-static {
  display: none;
}

.app-shell.collapsed .nav a:hover {
  transform: none;
}

.app-shell.collapsed .sidebar-toggle {
  margin-left: 0;
  margin-inline: auto;
  align-self: center;
}

.app-shell.collapsed .brand,
.app-shell.collapsed .sidebar-footer,
.app-shell.collapsed .user-card {
  align-items: center;
  text-align: center;
  width: 100%;
}

.app-shell.collapsed .brand {
  justify-content: center;
}

.app-shell.collapsed .brand-logo,
.app-shell.collapsed .user-card,
.app-shell.collapsed .logout-btn {
  margin-inline: auto;
}

.app-shell.collapsed .user-card {
  justify-content: center;
}

.app-shell.collapsed .nav a .nav-short {
  margin-inline: auto;
}

[dir="rtl"] input[type="search"],
[dir="rtl"] input[type="text"],
[dir="rtl"] input[list],
[dir="rtl"] textarea {
  text-align: right;
}

.app-shell.collapsed .logout-btn {
  align-self: center;
}

[dir="rtl"] body {
  direction: rtl;
  font-family: Arial, "Segoe UI", sans-serif;
}


html[dir="rtl"] .sidebar,
[dir="rtl"] .sidebar {
  border-right: none;
  border-left: 1px solid var(--line);
}

html[dir="rtl"] .brand,
[dir="rtl"] .brand {
  flex-direction: row-reverse;
}

html[dir="rtl"] .brand-text,
html[dir="rtl"] .user-meta,
html[dir="rtl"] .topbar,
[dir="rtl"] .brand-text,
[dir="rtl"] .user-meta,
[dir="rtl"] .topbar {
  text-align: right;
}

html[dir="rtl"] .sidebar-toggle,
[dir="rtl"] .sidebar-toggle {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .nav a,
[dir="rtl"] .nav a {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .nav-group {
  text-align: right;
  padding-inline-start: 0;
  padding-inline-end: 12px;
}

[dir="rtl"] .nav a.nav-item {
  padding-inline-start: 12px;
  padding-inline-end: 28px;
}

[dir="rtl"] .nav-title {
  text-align: right;
}

html[dir="rtl"] .calendar-range,
[dir="rtl"] .calendar-range {
  text-align: right;
}

html[dir="rtl"] .calendar-day-label,
[dir="rtl"] .calendar-day-label {
  flex-direction: row-reverse;
}

html[dir="rtl"] .event-icon,
[dir="rtl"] .event-icon {
  margin-right: 0;
  margin-left: 6px;
}

[dir="rtl"] .event-icon-corner {
  right: auto;
  left: 10px;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}



