
:root {
  --ui-scale: 1;
  --bg: #f4efe7;
  --bg-deep: #ece3d5;
  --panel: rgba(255, 252, 246, 0.9);
  --panel-strong: #fffdf8;
  --panel-accent: #f7f0e3;
  --ink: #18201c;
  --muted: #687268;
  --muted-strong: #4e5a52;
  --brand: #FD7516; /* primary orange */
  --brand-deep: #550219; /* primary burgundy */
  --brand-soft: #FECC00; /* supporting yellow */
  /* RGB helpers for translucent uses */
  --brand-red: #E31E24; /* brand red */
  --brand-gold: #D7B56D; /* supporting gold */
  --brand-silver: #C5C6C6; /* supporting silver */
  --brand-r: 253, 117, 22;
  --brand-deep-r: 85, 2, 25;
  --brand-soft-r: 254, 204, 0;
  --accent-r: 204, 111, 60;
  --brand-red-r: 227, 30, 36;
  --brand-gold-r: 215, 181, 109;
  --brand-silver-r: 197, 198, 198;
  --brand-glow: rgba(253, 117, 22, 0.18);
  --accent: #CC6F3C; /* supporting brown */
  --accent-soft: rgba(204, 111, 60, 0.08);
  --sidebar: #550219; /* brand deep (burgundy) */
  --sidebar-soft: #6f0b29; /* slightly lighter burgundy for soft surfaces */
  --border: rgba(24, 32, 28, 0.1);
  --border-strong: rgba(24, 32, 28, 0.16);
  --shadow: 0 22px 56px rgba(44, 37, 26, 0.11);
  --shadow-soft: 0 12px 26px rgba(44, 37, 26, 0.08);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --page-max-width: 1720px;
  --page-section-gap: 20px;
  --surface-padding: 24px;
  --surface-padding-compact: 20px;
  --surface-padding-mobile: 18px;
  --page-title-size: clamp(1.5rem, 2vw, 2.2rem);
  --section-title-size: clamp(1.08rem, 1.35vw, 1.45rem);
  --body-copy-size: 0.94rem;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  font-size: calc(16px * var(--ui-scale));
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(var(--brand-r), 0.26), transparent 22%),
    radial-gradient(circle at left center, rgba(65, 82, 70, 0.14), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), transparent 35%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.48;
  font-size: 0.9375rem;
}

.news-search-panel {
  margin-bottom: 16px;
}

.news-search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.news-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(24, 32, 28, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.news-search-icon {
  color: var(--muted);
  font-size: 1rem;
}

.news-search-input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  padding: 0;
}

.news-search-input:focus {
  outline: none;
}

body.mobile-sidebar-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(24, 32, 28, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 32, 28, 0.02) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 auto;
  width: 32rem;
  height: 32rem;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(var(--brand-r), 0.14), transparent 66%);
  transform: translate(24%, 22%);
  filter: blur(10px);
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  place-content: center;
  place-items: center;
  padding: 28px 24px;
}

.consent-body {
  min-height: 100vh;
  overflow: hidden;
}

.consent-layout {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 24px;
  overflow: hidden;
}

.consent-layout::before,
.consent-layout::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(12px);
}

.consent-layout::before {
  top: 12%;
  left: 8%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(var(--brand-gold-r), 0.18), rgba(var(--brand-gold-r), 0));
}

.consent-layout::after {
  right: 4%;
  bottom: 10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(var(--brand-gold-r), 0.22), rgba(var(--brand-gold-r), 0));
}

.auth-card,
.shell-main {
  position: relative;
  z-index: 1;
}

.auth-card {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  width: min(1040px, 100%);
  align-items: stretch;
}

.auth-card-compact {
  width: min(620px, 100%);
  grid-template-columns: 1fr;
}

.consent-modal-shell {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
}

.consent-modal-backdrop {
  position: absolute;
  inset: -48px;
  border-radius: calc(var(--radius-xl) + 20px);
  background: rgba(252, 249, 242, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 90px rgba(63, 46, 18, 0.12);
}

.consent-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 20px;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 34px 30px 28px;
  border-radius: calc(var(--radius-xl) + 2px);
}

.consent-modal-actions {
  margin-top: 4px;
}

.auth-copy,
.panel,
.hero-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.auth-copy {
  padding: 44px;
  background:
    linear-gradient(160deg, rgba(23, 30, 27, 0.98), rgba(36, 47, 41, 0.96)),
    var(--sidebar);
  color: var(--panel-accent);
}

.auth-copy h1,
.hero-card h1,
.page-heading h1,
.assignment-command-main h1,
.theory-atlas-main h1,
.course-workspace-copy h1,
.panel h2 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
  line-height: 1.08;
}

.auth-copy h1 {
  font-size: clamp(2.3rem, 4vw, 4.3rem);
  margin-top: 10px;
}

.hero-card h1,
.page-heading h1,
.assignment-command-main h1,
.theory-atlas-main h1,
.course-workspace-copy h1 {
  font-size: var(--page-title-size);
  max-width: none;
}

.panel h2 {
  font-size: var(--section-title-size);
  margin-top: 0;
  margin-bottom: 0.5em;
  line-height: 1.15;
}

.hero-card p,
.panel p,
.panel li,
.page-heading p,
.news-card p,
.course-workspace-copy p,
.assignment-command-detail,
.theory-atlas-course {
  color: var(--muted-strong);
  line-height: 1.6;
  font-size: var(--body-copy-size);
}

.auth-copy p {
  color: rgba(247, 240, 226, 0.78);
  line-height: 1.65;
  font-size: var(--body-copy-size);
}

.notice-banner-error {
  border-color: rgba(163, 74, 58, 0.2);
  background: rgba(255, 246, 242, 0.92);
}

.news-feed {
  display: grid;
  gap: 12px;
}

.news-feed-item {
  padding: 18px 20px;
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
}

.news-feed-item--compact {
  padding: 16px 18px;
}

.news-feed-item--important {
  border-color: rgba(var(--brand-r), 0.24);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(250, 243, 228, 0.96)),
    var(--panel);
  box-shadow: 0 18px 42px rgba(var(--accent-r), 0.12);
}

.news-feed-item--important::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand-soft), var(--brand));
}

.news-feed-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.news-feed-item--compact .news-feed-header {
  margin-bottom: 0;
}

.news-feed-byline {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.news-feed-author {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}

.news-feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.news-feed-views {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-strong);
  white-space: nowrap;
}

.news-feed-views svg {
  flex: 0 0 auto;
  opacity: 0.82;
}

.news-feed-priority-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(var(--brand-r), 0.14);
  color: var(--brand-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.news-feed-body-wrap {
  display: block;
}

.news-feed-body-wrap--with-cover {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
}

.news-feed-cover {
  flex: 0 0 auto;
  min-width: 0;
}

.news-feed-cover-img {
  display: block;
  width: 200px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(247, 240, 227, 0.92);
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.news-feed-cover-img:hover {
  opacity: 0.88;
}

.news-feed-content {
  min-width: 0;
}

.news-feed-content > * + * {
  margin-top: 14px;
}

.news-feed-item--compact .news-feed-content > * + * {
  margin-top: 10px;
}

.news-feed-body {
  font-size: 0.84rem;
  color: var(--ink);
  line-height: 1.65;
  padding-top: 4px;
}

.news-feed-body--compact {
  max-width: 70ch;
  color: var(--muted-strong);
}

.news-feed-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 10px 0;
}

.news-feed-body p {
  margin: 0.45em 0;
  color: var(--ink);
}

.news-feed-body strong {
  font-weight: 800;
  color: var(--ink);
}

.news-feed-body p:first-child {
  margin-top: 0;
}

.news-feed-body p:last-child {
  margin-bottom: 0;
}

.news-feed-body a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-feed-body h1,
.news-feed-body h2,
.news-feed-body h3,
.news-feed-body h4,
.news-feed-body h5,
.news-feed-body h6 {
  margin: 0.9em 0 0.3em;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.news-feed-body h1 { font-size: 1.15rem; }
.news-feed-body h2 { font-size: 1.05rem; }
.news-feed-body h3,
.news-feed-body h4,
.news-feed-body h5,
.news-feed-body h6 { font-size: 0.9rem; }

.news-feed-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: inherit;
}

.news-feed-body th,
.news-feed-body td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.news-feed-body th {
  font-weight: 600;
  background: rgba(0, 0, 0, 0.03);
}

.news-feed-body pre,
.news-feed-body code {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  padding: 2px 5px;
}

.news-feed-body pre {
  padding: 10px 14px;
  overflow-x: auto;
  white-space: pre-wrap;
}

.news-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.news-image-gallery-compact {
  margin-top: 4px;
}

.news-image-link {
  display: block;
  flex: 0 0 auto;
}

.news-image-preview {
  display: block;
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(247, 240, 227, 0.92);
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.news-image-preview:hover {
  opacity: 0.85;
}

.news-attachments {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.news-attachments-compact {
  margin-top: 6px;
  padding-top: 10px;
}

.news-attachments-title {
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.news-attachments ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.news-attachments li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.news-attachments li span {
  flex-shrink: 0;
}

/* Lightbox */
#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  padding: 24px;
  align-items: stretch;
  justify-content: stretch;
}

#lightbox-overlay.lightbox-visible {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
}

.lightbox-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: 18px;
}

.lightbox-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(17, 23, 35, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.lightbox-meta {
  min-width: 0;
}

.lightbox-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.lightbox-caption {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.4;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lightbox-counter {
  min-width: 56px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  text-align: right;
}

.lightbox-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s;
}

.lightbox-download:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  display: block;
  max-width: min(92vw, 1440px);
  max-height: calc(100vh - 180px);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 23, 35, 0.68);
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(16px);
  transition: background 0.15s, border-color 0.15s;
}

.lightbox-nav:hover {
  background: rgba(17, 23, 35, 0.9);
  border-color: rgba(255, 255, 255, 0.26);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(14px);
  transition: background 0.15s, border-color 0.15s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 800px) {
  #lightbox-overlay {
    padding: 14px;
  }

  .lightbox-shell {
    gap: 12px;
  }

  .lightbox-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .lightbox-actions {
    justify-content: space-between;
  }

  .lightbox-counter {
    text-align: left;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .lightbox-prev {
    left: 4px;
  }

  .lightbox-next {
    right: 4px;
  }

  .lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 220px);
    border-radius: 14px;
  }
}

/* Extra images gallery (2nd image and beyond) */
.news-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.news-image-gallery-compact {
  margin-top: 4px;
}

.news-image-link {
  display: block;
  flex: 0 0 auto;
}

.news-image-preview {
  display: block;
  width: 100px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(247, 240, 227, 0.92);
  cursor: zoom-in;
  transition: opacity 0.15s;
}

.news-image-preview:hover {
  opacity: 0.85;
}

.news-attachments {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.news-attachments-compact {
  margin-top: 6px;
  padding-top: 10px;
}

.news-attachments-title {
  margin-bottom: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.news-attachments ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.news-attachments li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
}

.news-attachments li span {
  flex-shrink: 0;
}

.news-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
}

.news-pagination-summary {
  color: var(--muted);
  font-size: 0.82rem;
}

.news-pagination-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.news-pagination-link-active {
  background: rgba(var(--brand-gold-r), 0.14);
  border-color: rgba(var(--brand-gold-r), 0.35);
  color: var(--ink);
}

.empty-state-panel {
  padding: 24px;
}

.compact-button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.auth-copy p {
  color: rgba(247, 240, 226, 0.82);
}

.leaves-modal[hidden] {
  display: none;
}

.leaves-modal {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.leaves-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 22, 18, 0.46);
  backdrop-filter: blur(10px);
}

.leaves-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(88vh, 920px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(24, 32, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 239, 227, 0.88)),
    var(--panel-strong);
  box-shadow: 0 30px 90px rgba(46, 33, 15, 0.18);
}

.leaves-modal__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.leaves-modal__meta {
  min-width: 0;
}

.leaves-modal__title {
  margin: 8px 0 6px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.05;
}

.leaves-modal__caption {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

.leaves-modal__close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(24, 32, 28, 0.1);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.leaves-modal__filters {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}

.leaves-modal__field {
  min-width: min(220px, 100%);
  flex: 1 1 220px;
}

.leaves-modal__field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.leaves-modal__refresh {
  flex-shrink: 0;
}

.leaves-modal__content {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.leaves-summary-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.leaves-record-list {
  display: grid;
  gap: 14px;
}

.leaves-record-card {
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(249, 243, 234, 0.72)),
    var(--panel);
  border: 1px solid rgba(24, 32, 28, 0.08);
}

.leaves-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.leaves-record-head strong {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}

.leaves-record-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.leaves-record-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.leaves-record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.leaves-empty-state {
  display: grid;
  gap: 8px;
  padding: 24px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 239, 230, 0.7)),
    var(--panel);
  border: 1px solid rgba(24, 32, 28, 0.08);
}

.leaves-empty-state strong {
  font-size: 1rem;
}

.leaves-empty-state p {
  margin: 0;
  color: var(--muted);
}

.leaves-empty-state-error {
  border-color: rgba(162, 63, 38, 0.18);
  background: linear-gradient(180deg, rgba(255, 247, 244, 0.96), rgba(255, 238, 231, 0.84));
}

.leaves-empty-state-info {
  margin-bottom: 18px;
  border-color: rgba(42, 95, 71, 0.16);
  background: linear-gradient(180deg, rgba(244, 251, 247, 0.96), rgba(232, 244, 237, 0.84));
}

@media (max-width: 800px) {
  .leaves-modal {
    padding: 14px;
  }

  .leaves-modal__dialog {
    max-height: 92vh;
    padding: 18px;
    border-radius: 22px;
  }

  .leaves-modal__toolbar,
  .leaves-record-head {
    flex-direction: column;
    align-items: stretch;
  }

  .leaves-record-chips {
    justify-content: flex-start;
  }

  .leaves-modal__filters {
    align-items: stretch;
  }

  .leaves-modal__refresh {
    width: 100%;
  }

}
