:root {
  --md-font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --md-sys-color-primary: #3a6ff8;
  --md-sys-color-primary-container: #e6edff;
  --md-sys-color-secondary: #6c5ce7;
  --md-sys-color-secondary-container: #edeaff;
  --md-sys-color-tertiary: #10b981;
  --md-sys-color-tertiary-container: #e8fff4;
  --md-sys-color-surface: #f9fafb;
  --md-sys-color-surface-variant: #ffffff;
  --md-sys-color-outline: #e2e8f0;
  --md-sys-color-outline-variant: #cbd5e1;
  --md-sys-color-text: #0f172a;
  --md-sys-color-subtle: #475569;
  --md-sys-color-success: #27ae60;
  --md-sys-color-error: #eb5757;
  --md-sys-color-warning: #f2c94c;
  --md-sys-shadow-strong: 0 24px 70px -36px rgba(58, 111, 248, 0.4);
  --md-sys-shadow-soft: 0 18px 42px -28px rgba(108, 92, 231, 0.3);
  --md-sys-shadow-card: 0 12px 32px -16px rgba(15, 23, 42, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(58, 111, 248, 0.08), rgba(108, 92, 231, 0.05)),
              radial-gradient(circle at 80% 20%, rgba(58, 111, 248, 0.08), transparent 40%),
              var(--md-sys-color-surface);
  color: var(--md-sys-color-text);
  font-family: var(--md-font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  line-height: 1.55;
}

.hidden {
  display: none !important;
}

.material-symbols-rounded {
  font-variation-settings:
    'FILL' 0,
    'wght' 500,
    'GRAD' 0,
    'opsz' 24;
  vertical-align: middle;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-view {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: radial-gradient(circle at 20% 20%, rgba(155, 208, 255, 0.35), transparent 50%),
              radial-gradient(circle at 80% 10%, rgba(131, 146, 253, 0.35), transparent 46%),
              linear-gradient(135deg, rgba(11, 87, 208, 0.08), rgba(103, 80, 164, 0.08));
}

.landing-shell {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  align-items: stretch;
}

.welcome-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(58, 111, 248, 0.12), rgba(108, 92, 231, 0.12)),
              radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.18), transparent 30%),
              #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--md-sys-shadow-card);
  display: grid;
  gap: 20px;
}

.welcome-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 25%, rgba(58, 111, 248, 0.2), transparent 35%),
              radial-gradient(circle at 60% 80%, rgba(16, 185, 129, 0.18), transparent 40%);
  pointer-events: none;
  opacity: 0.6;
}

.welcome-header {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.welcome-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 11px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.welcome-eyebrow .material-symbols-rounded {
  font-size: 18px;
  color: #2563eb;
}

.welcome-title {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  color: #0f172a;
  letter-spacing: -0.01em;
}

.welcome-copy {
  margin: 0;
  max-width: 620px;
  color: #475569;
  font-size: 1rem;
}

.welcome-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(58, 111, 248, 0.12);
  color: #1d4ed8;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.welcome-badge.success {
  background: rgba(16, 185, 129, 0.12);
  color: #0f7b32;
}

.feature-pills {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-weight: 600;
}

.feature-pill .material-symbols-rounded {
  color: #4f46e5;
}

.login-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: 40px 36px 44px;
  box-shadow: var(--md-sys-shadow-strong);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.brand-logo {
  width: 112px;
  align-self: center;
  filter: drop-shadow(0 14px 24px rgba(11, 87, 208, 0.25));
}

.login-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.0125em;
  margin: 0;
  color: var(--md-sys-color-text);
}

.login-subtitle {
  text-align: center;
  margin: -12px 0 0;
  color: var(--md-sys-color-subtle);
  font-size: 0.95rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.md-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.md-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--md-sys-color-subtle);
  letter-spacing: 0.02em;
}

.md-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--md-sys-color-outline);
  background: #f8fafc;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.md-input-wrapper--textarea {
  align-items: flex-start;
}

.md-input-wrapper:focus-within {
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 0 0 3px rgba(58, 111, 248, 0.18);
  transform: translateY(-1px);
}

.md-input-wrapper .material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

.md-field--readonly .md-label {
  color: #1e293b;
}

.md-input-wrapper--readonly {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: none;
}

.md-field--readonly .md-input {
  font-weight: 500;
  cursor: default;
}

.md-field--readonly .md-input:disabled {
  color: #0f172a;
  -webkit-text-fill-color: #0f172a;
  opacity: 1;
}

.md-field--readonly .md-input--empty:disabled {
  color: #94a3b8;
  -webkit-text-fill-color: #94a3b8;
  font-style: italic;
}

.md-input,
.md-select,
.md-textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 1rem;
  color: var(--md-sys-color-text);
  font-family: inherit;
}

.md-input--textarea {
  min-height: 96px;
  resize: vertical;
}

.md-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.md-input::placeholder,
.md-textarea::placeholder {
  color: rgba(71, 85, 105, 0.6);
}

.md-textarea {
  min-height: 110px;
  resize: vertical;
}

.form-error {
  font-size: 0.85rem;
  color: #c62828;
  text-align: center;
  font-weight: 600;
}

.md-button { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 22px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.md-button.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.md-button.is-loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: button-spin 0.8s linear infinite;
  display: inline-block;
  margin-left: 8px;
}

.md-button.is-loading span.material-symbols-rounded {
  opacity: 0.75;
}

.md-button span.material-symbols-rounded {
  font-size: 20px;
}

.md-button:focus-visible {
  outline: 3px solid rgba(11, 87, 208, 0.3);
  outline-offset: 2px;
}

.md-button:hover {
  transform: translateY(-1px);
}

.md-button--filled {
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
  color: white;
  box-shadow: 0 12px 30px -20px rgba(58, 111, 248, 0.85);
}

.md-button--filled:hover {
  box-shadow: 0 18px 42px -18px rgba(108, 92, 231, 0.6);
}

.md-button--tonal {
  background: rgba(103, 80, 164, 0.12);
  color: var(--md-sys-color-secondary);
}

.md-button--tonal:hover {
  background: rgba(103, 80, 164, 0.18);
}

.md-button--outlined {
  background: transparent;
  border: 1px solid rgba(58, 111, 248, 0.35);
  color: var(--md-sys-color-primary);
}

.md-button--outlined:hover {
  background: rgba(58, 111, 248, 0.08);
}

.md-button--text {
  background: transparent;
  color: var(--md-sys-color-primary);
  padding-inline: 14px;
}

.md-button--danger {
  background: rgba(220, 53, 69, 0.12);
  color: #b3261e;
}

.md-button--danger:hover {
  background: rgba(220, 53, 69, 0.18);
}

.md-button--success {
  background: rgba(39, 174, 96, 0.16);
  color: var(--md-sys-color-success);
}

.md-button--success:hover {
  background: rgba(39, 174, 96, 0.22);
}

.md-button--small {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 14px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 14px 32px -18px rgba(58, 111, 248, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px -20px rgba(108, 92, 231, 0.6);
}

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

.primary-btn:focus-visible {
  outline: 3px solid rgba(58, 111, 248, 0.35);
  outline-offset: 3px;
}

.primary-btn .material-symbols-rounded {
  font-size: 22px;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  backdrop-filter: blur(8px);
}

.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 14px clamp(16px, 4vw, 48px);
  border-radius: 0 0 12px 12px;
  height: 72px;
  display: flex;
  align-items: center;
  color: #0f172a;
}

.top-bar-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-cluster img {
  height: 42px;
  width: auto;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0b1f44;
}

.brand-subtitle {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.7);
  font-weight: 500;
}

.brand-tagline {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.56);
  font-weight: 500;
}

.app-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.16);
  color: #0f172a;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.4);
}

.app-action-btn .material-symbols-rounded {
  font-size: 19px;
}

.app-action-btn:hover {
  transform: translateY(-1px) scale(1.01);
}

.app-action-btn--ghost {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(76, 29, 149, 0.12));
  border-color: rgba(124, 58, 237, 0.36);
  color: #4c1d95;
}

.app-action-btn--ghost:hover {
  box-shadow: 0 12px 30px -18px rgba(124, 58, 237, 0.7);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(76, 29, 149, 0.16));
}

.app-action-btn--alert {
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.14), rgba(239, 68, 68, 0.1));
  border-color: rgba(248, 113, 113, 0.38);
  color: #b91c1c;
}

.app-action-btn--alert:hover {
  box-shadow: 0 12px 30px -18px rgba(248, 113, 113, 0.75);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(239, 68, 68, 0.14));
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.primary-tabs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 14px 30px -22px rgba(15, 23, 42, 0.45);
}

.primary-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #0b1f44;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-tab .material-symbols-rounded {
  font-size: 19px;
}

.primary-tab:hover {
  background: rgba(58, 111, 248, 0.08);
  box-shadow: inset 0 0 0 1px rgba(58, 111, 248, 0.14);
  transform: translateY(-1px);
}

.primary-tab.active-tab {
  background: #3a6ff8;
  color: #ffffff;
  box-shadow: 0 12px 26px -16px rgba(58, 111, 248, 0.75);
}

.primary-tab.active-tab:hover {
  box-shadow: 0 14px 30px -16px rgba(58, 111, 248, 0.8);
}

.primary-tabs-dropdown {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 28px -18px rgba(15, 23, 42, 0.3);
  color: #0b1f44;
}

.primary-tabs-dropdown select {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: inherit;
  outline: none;
}

.primary-tabs-dropdown .material-symbols-rounded {
  font-size: 18px;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(12px);
  align-items: stretch;
  position: relative;
  z-index: 40;
}

.tab-bar--secondary {
  margin-top: 8px;
  border-radius: 12px;
  box-shadow: 0 12px 28px -20px rgba(15, 23, 42, 0.3);
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 1100px) {
  .top-bar-shell {
    grid-template-columns: auto 1fr;
  }

  .app-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 820px) {
  .top-app-bar {
    height: auto;
    padding: 12px clamp(14px, 4vw, 32px);
  }

  .top-bar-shell {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .brand-cluster {
    align-items: flex-start;
  }

  .primary-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .primary-tabs {
    display: none;
  }

  .primary-tabs-dropdown {
    display: inline-flex;
  }

  .app-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
}

.tab-section {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
}

.tab-section--primary {
  flex: 1 1 320px;
  min-width: min(100%, 260px);
}

.tab-section--primary .tab-button {
  flex: 1 1 160px;
}

.tab-section--groups {
  flex: 0 1 auto;
  justify-content: flex-end;
  margin-left: auto;
}

.tab-button {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--md-sys-color-subtle);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tab-button:hover {
  background: rgba(11, 87, 208, 0.06);
  color: var(--md-sys-color-primary);
  transform: translateY(-1px);
}

.tab-button.active-tab {
  color: var(--md-sys-color-primary);
  background: rgba(11, 87, 208, 0.12);
  box-shadow: inset 0 0 0 1px rgba(11, 87, 208, 0.12);
}

.tab-button.active-tab::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 6px;
  height: 3px;
  background: linear-gradient(135deg, var(--md-sys-color-primary), rgba(103, 80, 164, 0.9));
  border-radius: 999px;
}

.tab-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

.tab-group--hidden {
  display: none !important;
}

.tab-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 18px;
  padding: 12px 18px;
  font-weight: 600;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.14), rgba(148, 163, 184, 0.22));
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 220px;
}

.tab-group-toggle:hover,
.tab-group.is-open .tab-group-toggle {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 12px 30px -16px rgba(79, 70, 229, 0.55);
  color: var(--md-sys-color-primary);
  transform: translateY(-1px);
}

.tab-group-toggle[disabled] {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.tab-group-toggle .material-symbols-rounded {
  font-size: 20px;
}

.tab-group-caret {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.tab-group.is-open .tab-group-caret {
  transform: rotate(-180deg);
}

.tab-group-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 28px 60px -34px rgba(15, 23, 42, 0.45);
  min-width: 260px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.tab-group.is-open .tab-group-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.tab-group-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  right: 36px;
  width: 16px;
  height: 16px;
  background: inherit;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  border-left: 1px solid rgba(148, 163, 184, 0.25);
  transform: rotate(45deg);
  z-index: -1;
}

.tab-group-menu .tab-button {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 14px;
  flex: none;
  font-weight: 600;
}

.tab-group-menu .tab-button::after {
  display: none;
}

.tab-group-menu .tab-button.active-tab {
  box-shadow: inset 0 0 0 1px rgba(11, 87, 208, 0.16);
}

@media (max-width: 900px) {
  .tab-section--primary {
    flex: 1 1 100%;
  }

  .tab-section--groups {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .tab-group {
    flex: 1 1 100%;
  }

  .tab-group-toggle {
    width: 100%;
  }

  .tab-group-menu {
    position: relative;
    inset: auto;
    margin-top: 12px;
    box-shadow: 0 16px 50px -32px rgba(15, 23, 42, 0.5);
  }

  .tab-group-menu::before {
    display: none;
  }
}

.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 48px clamp(18px, 5vw, 40px) 64px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--md-sys-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 28px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(6px);
}

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

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.panel-title .material-symbols-rounded {
  font-size: 26px;
  color: var(--md-sys-color-primary);
}

.panel-subtitle {
  margin: 0;
  color: var(--md-sys-color-subtle);
  font-size: 0.95rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.recruitment-pipeline-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.recruitment-pipeline-grid .md-card {
  flex: 1 1 320px;
  min-width: 0;
}

.recruitment-pipeline-grid .md-card:first-child {
  flex: 0 1 420px;
}

.recruitment-table-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.recruitment-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.md-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 24px;
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: var(--md-sys-shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.md-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--md-sys-shadow-soft);
  border-color: rgba(148, 163, 184, 0.5);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.015em;
  color: var(--md-sys-color-text);
}

.card-subtitle {
  margin-top: -6px;
  color: var(--md-sys-color-subtle);
  font-size: 0.95rem;
}

.portal-panel {
  gap: 32px;
}

.portal-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(58, 111, 248, 0.12), rgba(108, 92, 231, 0.18));
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--md-sys-shadow-soft);
  backdrop-filter: blur(12px);
}

.portal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 38%),
              radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.24), transparent 32%);
  pointer-events: none;
}

.portal-hero__content,
.portal-hero__meta {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--md-sys-color-secondary);
  font-size: 0.85rem;
}

.hero-heading {
  margin: 4px 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  margin: 0;
  color: rgba(15, 23, 42, 0.8);
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2a44;
  box-shadow: 0 12px 28px -18px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.35);
}

.portal-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.hero-meta-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.35);
}

.hero-meta-card .material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

.meta-label {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
}

.meta-value {
  margin: 2px 0 0;
  color: rgba(15, 23, 42, 0.75);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.metric-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -22px rgba(15, 23, 42, 0.32);
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(58, 111, 248, 0.12);
  color: var(--md-sys-color-primary);
}

.metric-card.metric-casual .metric-icon {
  background: rgba(242, 201, 76, 0.18);
  color: #b7791f;
}

.metric-card.metric-medical .metric-icon {
  background: rgba(39, 174, 96, 0.16);
  color: var(--md-sys-color-success);
}

.metric-label {
  margin: 0;
  color: rgba(15, 23, 42, 0.65);
  font-weight: 600;
}

.metric-value {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: 1.4rem;
  color: #0f172a;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-unit {
  font-size: 0.9rem;
  color: var(--md-sys-color-subtle);
}

.balance-negative {
  color: #b3261e;
}

.balance-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  color: #334155;
  font-size: 0.95rem;
}

.balance-note .material-symbols-rounded {
  font-size: 20px;
  color: #0f172a;
}

.balance-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(179, 38, 30, 0.08);
  border: 1px solid rgba(179, 38, 30, 0.18);
  color: #b3261e;
  font-weight: 600;
}

.balance-warning .material-symbols-rounded {
  font-size: 22px;
}

.balance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.balance-chip .material-symbols-rounded {
  font-size: 22px;
}

.balance-chip strong {
  display: inline-block;
  font-size: 1.05rem;
  margin-left: 4px;
}

.balance-chip .unit {
  font-size: 0.8rem;
  color: var(--md-sys-color-subtle);
  margin-left: 2px;
}

.chip-annual {
  color: #0f7b32;
  background: rgba(16, 200, 84, 0.12);
}

.chip-casual {
  color: #a66500;
  background: rgba(255, 193, 7, 0.18);
}

.chip-medical {
  color: #b3261e;
  background: rgba(255, 82, 82, 0.16);
}

.holiday-preview-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
}

.holiday-preview-list::-webkit-scrollbar {
  height: 8px;
}

.holiday-preview-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 999px;
}

.holiday-preview-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.22);
  min-width: 240px;
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

.holiday-preview-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58, 111, 248, 0.06), rgba(108, 92, 231, 0.04));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.holiday-preview-item:hover::before {
  opacity: 1;
}

.holiday-preview-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(58, 111, 248, 0.12);
  color: var(--md-sys-color-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.holiday-preview-date__month {
  font-size: 0.75rem;
}

.holiday-preview-date__day {
  font-size: 1.35rem;
  line-height: 1;
}

.holiday-preview-date--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(58, 111, 248, 0.12);
  color: var(--md-sys-color-primary);
  font-weight: 700;
}

.holiday-preview-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.holiday-preview-name {
  font-weight: 700;
  color: rgba(15, 23, 42, 0.9);
  font-size: 1rem;
}

.holiday-preview-meta {
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.9);
}

.holiday-preview-more {
  font-size: 0.85rem;
  margin-top: 4px;
  color: rgba(71, 85, 105, 0.8);
}

.holiday-preview-empty {
  margin: 0;
  font-style: italic;
}

.modern-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.form-row--split {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.modern-field .md-label {
  font-size: 0.95rem;
}

.large-input {
  padding: 14px 16px;
}

.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid var(--md-sys-color-outline);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.2);
}

.toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.toggle-track::after {
  content: '';
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 4px;
  box-shadow: 0 8px 18px -10px rgba(15, 23, 42, 0.5);
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--md-sys-color-primary), var(--md-sys-color-secondary));
  box-shadow: 0 10px 26px -18px rgba(58, 111, 248, 0.65);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.toggle-label {
  font-weight: 700;
  color: #0f172a;
  text-transform: capitalize;
}

.half-day-period.hidden {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 20px;
  align-items: end;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.65);
}

.checkbox-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--md-sys-color-primary);
}

.form-grid button[type="submit"] {
  justify-self: end;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 34, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-card {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--md-sys-shadow-soft);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-card--wide {
  width: min(720px, 100%);
  max-height: 85vh;
}

.modal-body-scroll {
  overflow-y: auto;
  max-height: 60vh;
  padding-right: 4px;
}

.employee-modal {
  max-height: 90vh;
}

#empModal {
  align-items: flex-start;
  padding-top: clamp(32px, 8vh, 64px);
  padding-bottom: clamp(32px, 8vh, 64px);
  overflow-y: auto;
}

#empModal .modal-card {
  margin: 0 auto;
}

#candidateDetailsModal {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.employee-modal__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#candidateHireFields {
  display: contents;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: rgba(71, 85, 105, 0.85);
  font-size: 22px;
  cursor: pointer;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 120;
  pointer-events: none;
}

.app-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--md-sys-color-text);
  box-shadow: var(--md-sys-shadow-card);
  border-left: 4px solid var(--md-sys-color-primary);
  min-width: 260px;
  max-width: 360px;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: auto;
}

.app-toast span.material-symbols-rounded {
  font-size: 22px;
  color: var(--md-sys-color-primary);
}

.app-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.app-toast--success {
  border-left-color: #0f7b32;
}

.app-toast--success span.material-symbols-rounded {
  color: #0f7b32;
}

.app-toast--error {
  border-left-color: #b3261e;
}

.app-toast--error span.material-symbols-rounded {
  color: #b3261e;
}

.app-toast--warning {
  border-left-color: #9a6b00;
}

.app-toast--warning span.material-symbols-rounded {
  color: #9a6b00;
}

.app-toast--info {
  border-left-color: var(--md-sys-color-primary);
}

.app-toast--info span.material-symbols-rounded {
  color: var(--md-sys-color-primary);
}

@media (max-width: 640px) {
  .toast-container {
    right: 16px;
    left: 16px;
    top: auto;
    bottom: 24px;
  }

  .app-toast {
    width: 100%;
    max-width: none;
  }
}

.comments-modal {
  width: min(560px, 100%);
  max-height: 80vh;
  overflow: hidden;
}

.comments-modal-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comments-modal-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(71, 85, 105, 0.85);
}

.comments-modal-name {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.88);
}

.candidate-details-modal {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: 0;
  padding: clamp(24px, 4vw, 40px);
  box-sizing: border-box;
  overflow-y: auto;
}

.candidate-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.candidate-details-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

.candidate-details-column--info {
  min-width: 0;
}

.candidate-details-column--preview {
  min-width: 0;
}

.candidate-details-summary {
  display: grid;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.6);
}

.candidate-details-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.candidate-details-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(71, 85, 105, 0.85);
}

.candidate-details-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(15, 23, 42, 0.88);
  word-break: break-word;
}

.candidate-comments-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.6);
  min-height: 0;
  flex: 1;
}

.candidate-comments-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.candidate-comments-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
}

.candidate-comments-meta {
  font-size: 0.85rem;
  margin-top: 4px;
}

.candidate-comments-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.1);
  color: rgba(37, 99, 235, 0.95);
}

.candidate-comments-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.candidate-comments-form .md-textarea {
  min-height: 96px;
}

.candidate-cv-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.6);
  min-height: 0;
  flex: 1;
}

.candidate-cv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.candidate-cv-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
}

.candidate-cv-filename {
  font-size: 0.85rem;
}

.candidate-cv-preview {
  position: relative;
  flex: 1;
  min-height: 320px;
  border-radius: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.6);
  overflow: hidden;
  background: rgba(248, 250, 252, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.cv-preview-message {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(71, 85, 105, 0.85);
  line-height: 1.4;
}

.cv-preview-frame {
  border: none;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #fff;
}

@media (max-width: 900px) {
  .candidate-details-modal {
    padding: 24px 16px;
  }

  .candidate-details-grid {
    grid-template-columns: 1fr;
  }

  .candidate-cv-preview {
    min-height: 280px;
  }
}

.candidate-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.candidate-name {
  font-weight: 600;
  color: rgba(15, 23, 42, 0.92);
}

.comments-list {
  flex: 1;
  min-height: 160px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: rgba(241, 245, 249, 0.8);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.comment-item.own-comment {
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(239, 246, 255, 0.92);
}

.comment-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(71, 85, 105, 0.85);
}

.comment-text {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.9);
  line-height: 1.4;
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
}

.comment-edit {
  font-size: 0.75rem;
  color: var(--md-sys-color-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.comment-edit .material-symbols-rounded {
  font-size: 16px;
}

#prevLeaves {
  column-count: 3;
  column-gap: 18px;
}

@media (max-width: 1100px) {
  #prevLeaves {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  #prevLeaves {
    column-count: 1;
  }
}

.history-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  border: 1px solid var(--md-sys-color-outline);
  box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.28);
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
  width: 100%;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
}

.history-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(58, 111, 248, 0.06), rgba(108, 92, 231, 0.04));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.history-card:hover::before {
  opacity: 1;
}

.history-card .history-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.history-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.history-card .history-body {
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.history-card .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  background: rgba(148, 163, 184, 0.18);
  color: #334155;
  width: fit-content;
}

.history-card.status-approved {
  border-left: 6px solid var(--md-sys-color-success);
}

.history-card.status-approved .status-badge {
  background: rgba(39, 174, 96, 0.15);
  color: var(--md-sys-color-success);
}

.history-card.status-rejected {
  border-left: 6px solid var(--md-sys-color-error);
}

.history-card.status-rejected .status-badge {
  background: rgba(235, 87, 87, 0.15);
  color: var(--md-sys-color-error);
}

.history-card.status-pending {
  border-left: 6px solid var(--md-sys-color-warning);
}

.history-card.status-pending .status-badge {
  background: rgba(242, 201, 76, 0.22);
  color: #b7791f;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.chip--pending {
  background: rgba(255, 193, 7, 0.18);
  color: #9a6b00;
}

.chip--approved {
  background: rgba(24, 128, 56, 0.16);
  color: #0f7b32;
}

.chip--rejected {
  background: rgba(255, 82, 82, 0.16);
  color: #b3261e;
}

.chip--info {
  background: rgba(11, 87, 208, 0.12);
  color: var(--md-sys-color-primary);
}

.text-muted {
  color: rgba(71, 85, 105, 0.85);
  font-size: 0.9rem;
}

.text-quiet {
  color: rgba(107, 114, 128, 0.75);
  font-size: 0.75rem;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: 24px;
  padding: 20px 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 44px -34px rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-card__main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.list-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
}

.list-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.list-card textarea {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 12px;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.highlight-card {
  background: rgba(255, 247, 222, 0.9);
  border: 1px solid rgba(255, 215, 128, 0.55);
  box-shadow: 0 22px 44px -36px rgba(164, 112, 0, 0.55);
}

#onLeaveTodayList,
#managerUpcomingList,
#leaveRangeCards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 55px -38px rgba(15, 23, 42, 0.55);
}

.data-table thead {
  background: rgba(235, 240, 255, 0.85);
  color: var(--md-sys-color-subtle);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 0.9rem;
  text-align: left;
}

.data-table tbody tr:hover {
  background: rgba(11, 87, 208, 0.06);
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.table-search {
  width: 100%;
  max-width: 320px;
}

.sticky-col {
  position: sticky;
  background: rgba(255, 255, 255, 0.98);
  z-index: 5;
}

.no-col {
  left: 0;
  min-width: 64px;
  max-width: 64px;
}

.name-col {
  left: 64px;
  min-width: 180px;
  max-width: 220px;
}

.intern-flag-col,
.intern-flag-cell {
  text-align: center;
  width: 110px;
}

.intern-flag-toggle {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.actions-col {
  right: 0;
  min-width: 160px;
}

.filter-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 255, 0.7);
  font-size: 0.85rem;
}

.table-empty {
  text-align: center;
  padding: 24px 16px;
  color: var(--md-sys-color-subtle);
  font-size: 0.95rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.status-pill--active {
  background: rgba(24, 128, 56, 0.16);
  color: #0f7b32;
}

.status-pill--inactive {
  background: rgba(255, 82, 82, 0.16);
  color: #b3261e;
}

.table-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.table-actions button {
  border: none;
  background: none;
  color: var(--md-sys-color-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.table-actions button:hover {
  text-decoration: underline;
}

.table-actions button.action-danger {
  color: #b3261e;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 34, 0.35);
  display: flex;
  justify-content: flex-end;
  z-index: 120;
  transition: opacity 0.3s ease;
}

.drawer-panel {
  width: min(420px, 100%);
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: -20px 0 40px -32px rgba(15, 23, 42, 0.55);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.drawer-backdrop.show .drawer-panel {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.drawer-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.drawer-body {
  padding: 22px;
  overflow-y: auto;
}

.drawer-body .md-field {
  margin-bottom: 16px;
}

.drawer-actions {
  padding: 20px 22px;
  display: flex;
  gap: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.drawer-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: rgba(71, 85, 105, 0.8);
}

#calendarSection {
  background: rgba(248, 250, 255, 0.85);
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}

.calendar-grid div {
  padding: 10px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

.calendar-grid div.future {
  color: rgba(71, 85, 105, 0.6);
}

.calendar-grid div.future .calendar-employee {
  color: rgba(71, 85, 105, 0.7);
}

.calendar-grid div.future .calendar-type {
  opacity: 0.75;
}

.calendar-grid div.weekday {
  background: rgba(219, 226, 255, 0.6);
}

.calendar-grid div.calendar-today {
  background: rgba(191, 219, 254, 0.8);
  border: 2px solid rgba(37, 99, 235, 0.55);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.calendar-grid div.calendar-holiday {
  background: rgba(253, 230, 138, 0.9);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35);
}

.calendar-grid div.calendar-holiday .calendar-date {
  color: #b45309;
}

.calendar-grid div.calendar-holiday .calendar-name {
  background: rgba(217, 119, 6, 0.18);
  color: #92400e;
}

.calendar-grid div.calendar-holiday.calendar-today {
  border-color: rgba(217, 119, 6, 0.65);
}

.calendar-holiday-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(252, 211, 77, 0.32);
  color: #92400e;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

.calendar-holiday-label .material-symbols-rounded {
  font-size: 1rem;
  line-height: 1;
}

.calendar-empty {
  background: transparent;
  box-shadow: none;
}

.calendar-date {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1d4ed8;
}

.calendar-names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  font-size: 0.75rem;
  color: rgba(71, 85, 105, 0.85);
  text-align: left;
}

.calendar-name {
  width: 100%;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  line-height: 1.2;
  word-break: break-word;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.calendar-employee {
  color: rgba(30, 41, 59, 0.88);
  font-weight: 600;
}

.calendar-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(59, 130, 246, 0.16);
  color: #1d4ed8;
}

.calendar-type--annual {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
}

.calendar-type--casual {
  background: rgba(251, 191, 36, 0.22);
  color: #b45309;
}

.calendar-type--medical {
  background: rgba(134, 239, 172, 0.24);
  color: #15803d;
}

.calendar-type--unpaid {
  background: rgba(244, 114, 182, 0.2);
  color: #be185d;
}

.calendar-type--maternity {
  background: rgba(236, 72, 153, 0.18);
  color: #be185d;
}

.calendar-type--paternity {
  background: rgba(129, 140, 248, 0.22);
  color: #4338ca;
}

.calendar-type--other {
  background: rgba(203, 213, 225, 0.4);
  color: #334155;
}

.range-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.settings-form {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.settings-form__fields {
  flex: 1 1 220px;
  min-width: 200px;
}

.settings-form__fields--compact {
  flex: 0 1 140px;
  min-width: 120px;
}

.settings-form__fields--full {
  flex: 1 1 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-form__toggle {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-form__toggle--inline {
  flex: 0 1 auto;
  align-self: center;
}

.settings-form__toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--md-sys-color-primary);
}

.email-recipient-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(148, 163, 184, 0.08);
}

.email-recipient-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface);
}

.email-recipient-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--md-sys-color-primary);
}

.email-recipient-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--md-sys-color-on-surface-variant);
}

.settings-form__help {
  flex: 1 1 100%;
  font-size: 0.9rem;
  color: var(--md-sys-color-on-surface-variant);
}

.settings-form__divider {
  flex: 1 1 100%;
  border-top: 1px solid #e0e0e0;
  margin: 16px 0;
}

.settings-form__submit {
  align-self: flex-end;
}

.settings-status {
  margin-top: 12px;
  font-size: 0.92rem;
}

.settings-status--error {
  color: #b3261e;
}

.settings-status--success {
  color: #0b6b0b;
}

.holiday-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.holiday-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(11, 87, 208, 0.08);
  border: 1px solid rgba(11, 87, 208, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
}

.holiday-item__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}

.holiday-item__date {
  font-size: 1rem;
  font-weight: 700;
  color: var(--md-sys-color-primary);
}

.holiday-item__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--md-sys-color-text);
}

.holiday-item__iso {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.holiday-item__delete {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.range-actions label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--md-sys-color-subtle);
}

.range-actions input {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.8);
}

.positions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.position-item {
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--md-sys-color-surface, #ffffff);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  text-align: left;
}

.position-item__select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.position-item__select:focus-visible {
  outline: 3px solid rgba(103, 80, 164, 0.35);
  outline-offset: 4px;
  border-radius: 12px;
}

.position-item__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.position-item:hover {
  border-color: rgba(103, 80, 164, 0.4);
  box-shadow: 0 6px 12px rgba(31, 31, 31, 0.08);
}

.position-item--active {
  border-color: var(--md-sys-color-primary, #6750a4);
  background: rgba(103, 80, 164, 0.1);
  box-shadow: 0 8px 16px rgba(103, 80, 164, 0.2);
}

.position-item__icon {
  font-size: 28px;
  color: var(--md-sys-color-primary, #6750a4);
}

.position-item__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.position-item__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.position-item__title {
  font-weight: 600;
  font-size: 16px;
  color: var(--md-sys-color-on-surface, #1c1b1f);
}

.position-item__status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.position-item__status--open {
  background: rgba(16, 185, 129, 0.15);
  color: #0f9f6e;
}

.position-item__status--closed {
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
}

.position-item__meta {
  font-size: 13px;
  color: var(--md-sys-color-outline, #7a767f);
}

.position-item__description {
  font-size: 13px;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.position-item__chevron {
  color: var(--md-sys-color-outline, #7a767f);
}

.position-item--active .position-item__chevron,
.position-item--active .position-item__icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.candidate-download {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .top-app-bar {
    flex-wrap: wrap;
    gap: 14px;
  }
  .app-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .tab-button {
    font-size: 0.85rem;
    padding-inline: 12px;
  }
}

@media (max-width: 640px) {
  .login-card {
    padding: 32px 24px 36px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .tab-bar {
    flex-wrap: wrap;
  }
  .tab-button {
    flex: 1 1 calc(50% - 12px);
  }
  .range-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .range-actions label,
  .range-actions button {
    width: 100%;
  }
}
