:root {
  --zoom: 1;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-scale-base: 16px;
  --radius-sm: 8px;
  --radius-lg: 12px;
  --dept-col-width: calc(40px * var(--zoom));
  --name-col-width: calc(280px * var(--zoom));
  --day-col-width: calc(160px * var(--zoom));
  --row-height: calc(55px * var(--zoom));
  --ink: #172033;
  --muted: #687386;
  --line: #d9e0ea;
  --line-strong: #bcc7d6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-warm: #fbf8f2;
  --table-baby-blue: #edf8ff;
  --table-baby-blue-strong: #d8ecfb;
  --brand-blue: #1769d8;
  --brand-blue-dark: #0f54b8;
  --danger: #d92d20;
  --success: #218c53;
  --shadow-soft: 0 14px 40px rgba(23, 32, 51, 0.10);
  --shadow-pop: 0 24px 70px rgba(23, 32, 51, 0.24);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(23, 105, 216, 0.08), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, #f2f5f9 100%);
  color: var(--ink);
}

.header {
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(160px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.05);
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
}

.brand-logo {
  width: clamp(160px, 22vw, 320px);
  height: 36px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.brand-logo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.mobile-refresh-btn,
.desktop-refresh-btn {
  display: none;
}

.filter-panel .desktop-refresh-btn:not(.hidden) {
  grid-column: 6 !important;
  justify-self: end !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  flex: 0 0 36px !important;
  padding: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #c8d5e5 !important;
  border-radius: 50% !important;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f9 100%) !important;
  color: #243447 !important;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  appearance: none !important;
}

.filter-panel .sheet-zoom-control {
  grid-column: 7;
}

.filter-panel .desktop-refresh-btn svg {
  width: 20px !important;
  height: 20px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.filter-panel .desktop-refresh-btn:active {
  transform: scale(0.94) !important;
}

.filter-panel .desktop-refresh-btn.is-refreshing svg {
  animation: mobile-refresh-spin 0.7s linear infinite !important;
}

.subtitle {
  font-size: 13px;
  color: #6e6e73;
  margin-top: 4px;
}

.controls,
.filter-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.controls {
  justify-content: flex-end;
  min-width: 0;
  gap: 8px;
}

.header .user-pill,
.header .sync-status {
  padding: 6px 10px;
  font-size: 12px;
}

.header select,
.header button {
  padding: 7px 12px;
  border-radius: 11px;
  font-size: 13px;
}

.header .zoom-controls {
  padding: 3px 8px;
  gap: 6px;
}

/* Auth-screen logo (use the high-res image the user provided as ./logo.png)
   Keep the image near natural size so it stays crisp; remove heavy filters. */
html body > #authLogoSilhouette,
body > #authLogoSilhouette {
  position: fixed !important;
  left: 50% !important;
  bottom: 9.2vh !important;
  transform: translateX(-50%) !important;
  max-height: 96px !important; /* tighten size to keep image crisp */
  width: auto !important;
  opacity: 1 !important;
  /* Use screen blend to keep logo bright on dark overlay */
  mix-blend-mode: screen !important;
  filter: none !important;
  pointer-events: none !important;
  image-rendering: -webkit-optimize-contrast !important;
  image-rendering: crisp-edges !important;
  z-index: 2001 !important;
  transition: transform 120ms ease, opacity 120ms ease, bottom 120ms ease !important;
}

@media (max-width: 768px) {
  html body > #authLogoSilhouette, body > #authLogoSilhouette { max-height: 72px !important; bottom: 7vh !important; }
}

/* When auth modal is visible, keep logo subtle behind but not interfering */
.auth-modal-open html body > #authLogoSilhouette,
.auth-modal-open body > #authLogoSilhouette {
  opacity: 0.99 !important;
  transform: translateX(-50%) scale(0.995) !important;
}

/* If you want the logo hidden entirely while modal is up, uncomment:
.auth-modal-open #authLogoSilhouette { display: none !important; }
*/
  border: 1px solid #d7e4f8;
}

.sync-status {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7e6;
  color: #8a5a00;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #f4d28c;
}

.sync-status.online {
  background: #eaf8f0;
  color: #17663b;
  border-color: #9ad7b1;
}

.sync-status.error {
  background: #fff0ed;
  color: #b42318;
  border-color: #f3b6ad;
}

.setup-banner {
  padding: 14px 24px;
  background: #fff4d6;
  color: #8c5f00;
  border-bottom: 1px solid #f0d66a;
  font-size: 14px;
  font-weight: 500;
}

.hidden {
  display: none;
}

select,
button,
input,
textarea {
  font: inherit;
}

select,
button {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 15px;
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

button {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(23, 105, 216, 0.18);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 105, 216, 0.22);
}

button:active {
  transform: translateY(0);
}

.secondary-btn {
  background: #f3f6fa;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.secondary-btn:hover {
  background: #e8eef7;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.08);
}

.notification-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.unread-badge {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f6fa;
  padding: 4px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.zoom-controls button {
  padding: 4px 10px;
  font-size: 18px;
  line-height: 1;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.zoom-controls span {
  font-size: 14px;
  font-weight: 500;
  min-width: 45px;
  text-align: center;
}

.filter-panel {
  background: rgba(255, 255, 255, 0.9);
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow: hidden;
  max-height: 92px;
  opacity: 1;
  transition: max-height 0.22s ease, padding 0.22s ease, opacity 0.18s ease, border-color 0.18s ease;
}

.filter-panel.is-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-color: transparent;
  pointer-events: none;
}

.filter-panel input,
.filter-panel select {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
}

.filter-panel button {
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 13px;
}

#toggleFiltersBtn.is-active {
  background: #eaf3ff;
  border-color: #b9d4fb;
  color: var(--brand-blue-dark);
}

.notification-filters {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #e8e8ed;
}

.notification-filters input,
.notification-filters select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 13px;
}

.mobile-agenda {
  display: none;
}

.mobile-agenda-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.mobile-agenda-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-agenda-head .mobile-agenda-title {
  margin-bottom: 0;
}

.mobile-agenda-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}

.mobile-agenda-controls select {
  width: 100%;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #d6dfeb;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 800;
}

.mobile-date-section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.mobile-date-section h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  margin-bottom: 10px;
}

.mobile-date-label {
  min-width: 0;
}

.mobile-date-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-left: auto;
  flex: 0 0 auto;
}

.mobile-weekday-label {
  color: #64748b;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.mobile-date-section.mobile-date-holiday {
  background: #fff0f0;
  border-color: #f2c4c4;
}

.mobile-date-section.mobile-date-holiday h4,
.mobile-date-section.mobile-date-holiday .mobile-weekday-label {
  color: var(--danger);
}

.mobile-date-section.mobile-date-today {
  background: #fff8df;
  border-color: #eba417;
  box-shadow: inset 0 0 0 2px rgba(235, 164, 23, 0.42), 0 12px 28px rgba(126, 86, 0, 0.10);
}

.mobile-date-section.mobile-date-holiday.mobile-date-today {
  background: #ffe9d6;
}

.mobile-date-section.mobile-date-today h4 {
  color: #7a4d00;
}

/* Hide schedule while auth modal is open to prevent blurred background peek */
.auth-modal-open .grid-wrapper,
.auth-modal-open .mobile-agenda {
  display: none !important;
}

/* Ensure modal overlay is fully opaque and prevent page scroll while open */
body.auth-modal-open { overflow: hidden !important; }
#authModal::before { background: rgba(15,23,42,0.95) !important; pointer-events: auto !important; z-index: 2000; }

/* Logo silhouette positioned across the viewport, sits above overlay but below modal content */
#authLogoSilhouette {
  /* Hidden by default; shown only while auth modal is active or when we intentionally
     keep the schedule hidden for auth. This prevents the logo appearing after login. */
  display: none;
  position: fixed;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%);
  height: 70vh !important;
  width: auto !important;
  max-width: none;
  opacity: 0.12 !important;
  z-index: 2001;
  pointer-events: none;
  /* Show original image pixels - remove heavy filters that may hide typography */
  filter: none !important;
  mix-blend-mode: normal !important;
  object-fit: contain;
  object-position: 50% 66% !important;
}
#authModal .modal-content { position: relative; z-index: 2002; }

/* When auth modal is open, move the silhouette lower to the empty area below the modal */
.auth-modal-open #authLogoSilhouette,
.hide-schedule-until-auth #authLogoSilhouette {
  /* Anchor the silhouette to the bottom but raise it so text is clearly visible
     and add a subtle drop shadow for contrast against the overlay. */
  top: auto !important;
  bottom: 10vh !important;
  transform: translate(-50%, 0) !important;
  opacity: 0.56 !important;
  /* Make dark logo pixels appear white while preserving drop shadow for contrast */
  filter: brightness(0) invert(1) drop-shadow(0 6px 8px rgba(0,0,0,0.6)) !important;
  object-position: 50% 85% !important;
  display: block !important;
}

/* Keep header and filter visible but slightly dimmed when auth modal open */
.auth-modal-open .header,
.auth-modal-open .filter-panel {
  opacity: 0.6;
  pointer-events: none;
}

/* Hide schedule until authenticated */
.hide-schedule-until-auth .grid-wrapper,
.hide-schedule-until-auth .mobile-agenda {
  display: none !important;
}

.mobile-today-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eba417;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.mobile-empty-day {
  border-top: 1px solid rgba(235, 164, 23, 0.28);
  padding: 12px 0 2px;
  color: #7a4d00;
  font-size: 13px;
  font-weight: 700;
}

.mobile-task-detail {
  border-top: 1px solid #eef2f7;
}

.mobile-task-detail summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.mobile-task-detail summary::-webkit-details-marker {
  display: none;
}

.mobile-task-detail summary::after {
  content: "+";
  margin-left: auto;
  color: #64748b;
  font-weight: 800;
}

.mobile-task-detail[open] summary::after {
  content: "-";
}

.mobile-task-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #0071e3;
  flex: 0 0 10px;
}

.mobile-task-dot.green { background: #30d158; }
.mobile-task-dot.red { background: #ff3b30; }
.mobile-task-dot.orange { background: #ff9500; }
.mobile-task-dot.purple { background: #af52de; }
.mobile-task-dot.yellow { background: #ffcc00; }
.mobile-task-dot.pink { background: #ffb6d5; }
.mobile-task-dot.teal { background: #5ac8fa; }
.mobile-task-dot.brown { background: #a2845e; }
.mobile-task-dot.black { background: #000; }
.mobile-task-dot.indigo { background: #5856d6; }
.mobile-task-dot.lime { background: #34c759; }

.mobile-task-body {
  padding: 0 0 12px 20px;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.mobile-task-row {
  width: 100%;
  appearance: none;
  border: 0;
  border-top: 1px solid #eef2f7;
  background: transparent;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  text-align: left;
  color: #172033;
  cursor: pointer;
}

.mobile-task-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mobile-task-row-main strong {
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-task-row-main em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-task-row-plus {
  color: #64748b;
  font-size: 18px;
  font-weight: 900;
}

.mobile-task-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-items: end;
}

.mobile-task-sheet.hidden {
  display: none;
}

.mobile-task-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.42);
}

.mobile-task-sheet-panel {
  position: relative;
  width: 100%;
  max-height: min(78svh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid #d8e2ef;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -22px 48px rgba(15, 23, 42, 0.24);
  padding: 10px 16px 16px;
}

.mobile-task-sheet-grip {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 12px;
}

.mobile-task-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.mobile-task-sheet-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.mobile-task-sheet-head h3 {
  margin: 3px 0 0;
  color: #172033;
  font-size: 20px;
  line-height: 1.15;
}

.mobile-task-sheet-head button {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid #d8e2ef;
  background: #f8fafc;
  color: #172033;
  font-size: 24px;
  line-height: 1;
}

.mobile-task-sheet-body {
  display: grid;
  gap: 12px;
  padding: 14px 0;
}

.mobile-task-sheet-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
}

.mobile-task-sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-task-sheet-row,
.mobile-task-sheet-section {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px;
}

.mobile-task-sheet-row span,
.mobile-task-sheet-section > span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

.mobile-task-sheet-row strong,
.mobile-task-sheet-section p,
.mobile-task-sheet-section li {
  color: #172033;
  font-size: 13px;
  line-height: 1.45;
}

.mobile-task-sheet-section p {
  margin: 0;
}

.mobile-task-sheet-section ul {
  margin: 0;
  padding-left: 16px;
}

.mobile-task-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 4px;
}

.mobile-task-sheet-actions button {
  min-height: 44px;
  border-radius: 14px;
}

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

.grid-wrapper {
  overflow: auto;
  height: calc(100vh - 126px);
  background: var(--surface);
}

.grid-container {
  min-width: max-content;
  padding-bottom: 22px;
  box-sizing: border-box;
}

table {
  border-collapse: collapse;
  font-size: calc(14px * var(--zoom));
  min-width: 100%;
}

thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--table-baby-blue);
  box-shadow: 0 3px 0 rgba(148, 163, 184, 0.5), 0 10px 20px rgba(15, 23, 42, 0.08);
}

th {
  padding: calc(12px * var(--zoom)) calc(8px * var(--zoom));
  border-bottom: 2px solid #aebdd0;
  border-right: 1.5px solid #cbd8e6;
  font-size: calc(14px * var(--zoom));
  font-weight: 760;
  text-align: center;
  white-space: nowrap;
  min-width: var(--day-col-width);
  background: var(--table-baby-blue);
  line-height: 1.22;
  color: #283449;
}

th:nth-child(2) {
  position: sticky;
  left: var(--dept-col-width);
  background: var(--table-baby-blue);
  z-index: 11;
  text-align: left;
  padding-left: calc(16px * var(--zoom));
  min-width: var(--name-col-width);
  box-shadow: 2px 0 0 0 var(--table-baby-blue-strong), inset 0 -2px 0 #aebdd0;
}

th:first-child {
  position: sticky;
  left: 0;
  background: var(--table-baby-blue);
  z-index: 12;
  min-width: var(--dept-col-width);
  width: var(--dept-col-width);
  box-shadow: inset 0 -2px 0 #aebdd0;
}

th.holiday {
  color: var(--danger);
  font-weight: 760;
}

th.today-col {
  background: #fff2c7;
  color: #7a4d00;
  box-shadow: inset 0 0 0 2px #eba417, inset 0 -2px 0 #c98000;
}

.weekday-label {
  font-size: calc(10.5px * var(--zoom));
  font-weight: 650;
}

td {
  padding: 0;
  border-bottom: 1.5px solid #cfdbe8;
  border-right: 1.5px solid #cfdbe8;
  height: var(--row-height);
  position: relative;
  background: #fff;
}

.name-col {
  position: sticky;
  left: var(--dept-col-width);
  background: var(--table-baby-blue);
  z-index: 5;
  min-width: var(--name-col-width);
  width: var(--name-col-width);
  padding: 0 calc(16px * var(--zoom));
  font-size: calc(16.5px * var(--zoom));
  font-weight: 680;
  border-right: 2px solid #bfd4e8;
  border-bottom: 1.5px solid #c8d8e8;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 2px 0 0 0 #bfd4e8, inset 0 -1px 0 rgba(135, 154, 178, 0.24);
}

.dept-label {
  position: sticky;
  left: 0;
  background: linear-gradient(180deg, #6c7f96 0%, #52677f 100%);
  color: #fff;
  z-index: 15;
  width: var(--dept-col-width);
  min-width: var(--dept-col-width);
  max-width: var(--dept-col-width);
  text-align: center;
  padding: 0;
  font-size: calc(13px * var(--zoom));
  font-weight: 700;
  letter-spacing: var(--dept-label-letter-spacing, calc(1.8px * var(--zoom)));
  border-bottom: 3px solid #c8d8e8;
  overflow: hidden;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.22);
}

.dept-label span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-block;
  transform: translate(-50%, -50%) rotate(180deg) scale(var(--dept-label-scale, 1));
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
  pointer-events: none;
}

.day-cell {
  cursor: pointer;
  box-shadow: inset 0 -1px 0 rgba(139, 157, 180, 0.12);
}
.day-cell:hover { background: #eef6ff; }
.day-cell.holiday { background: #fff0f0; }
.day-cell.today-col {
  background: #fff8df;
  box-shadow: inset 2px 0 0 #eba417, inset -2px 0 0 #eba417, inset 0 -1px 0 rgba(235, 164, 23, 0.45);
}

.day-cell.holiday.today-col {
  background: #ffe9d6;
}

.day-cell.leave-cell {
  cursor: not-allowed;
}

.day-cell.leave-cell.today-col {
  background: #fff8df;
}

.day-cell.leave-cell:hover {
  background: #fff;
}

.day-cell.holiday.leave-cell,
.day-cell.holiday.leave-cell:hover {
  background: #fff0f0;
}

.day-cell.holiday.today-col.leave-cell,
.day-cell.holiday.today-col.leave-cell:hover {
  background: #ffe9d6;
}

.day-cell.today-col.leave-cell:hover {
  background: #fff8df;
}

.leave-mark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(2px * var(--zoom));
  padding: calc(4px * var(--zoom));
  color: #111827;
  line-height: 1;
  opacity: 0.86;
  pointer-events: none;
  text-align: center;
}

.leave-x {
  font-size: calc(15px * var(--zoom));
  font-weight: 650;
  line-height: 1;
  opacity: 0.78;
}

.leave-reason {
  max-width: 100%;
  color: #111827;
  font-size: calc(10px * var(--zoom));
  font-weight: 800;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-container {
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  bottom: 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: flex-start;
}

.task-container.single-task {
  justify-content: center;
}

.task-container.multi-task {
  justify-content: flex-start;
}

.more-tasks {
  min-height: calc(17px * var(--zoom));
  border-radius: calc(6px * var(--zoom));
  padding: calc(2px * var(--zoom)) calc(6px * var(--zoom));
  font-size: calc(11px * var(--zoom));
  background: #eef4ff;
  color: var(--brand-blue-dark);
  border: 1px dashed #8fb7ef;
  box-shadow: none;
  font-weight: 800;
}

.more-tasks:hover {
  background: #dcecff;
  box-shadow: none;
}

.task-bar {
  position: relative;
  min-height: calc(24px * var(--zoom));
  border-radius: calc(6px * var(--zoom));
  padding: calc(2px * var(--zoom)) calc(6px * var(--zoom));
  font-size: calc(11px * var(--zoom));
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.05;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.task-container.single-task .task-bar {
  min-height: calc(28px * var(--zoom));
  padding: calc(3px * var(--zoom)) calc(7px * var(--zoom));
  font-size: calc(12px * var(--zoom));
}

.task-container.single-task .task-title {
  font-weight: 800;
}

.task-flag-icons {
  position: absolute;
  right: calc(4px * var(--zoom));
  top: calc(3px * var(--zoom));
  display: flex;
  gap: calc(1px * var(--zoom));
  align-items: center;
  justify-content: center;
  min-width: calc(18px * var(--zoom));
  padding: calc(1px * var(--zoom)) calc(2px * var(--zoom));
  border-radius: calc(5px * var(--zoom));
  background: rgba(255, 255, 255, 0.82);
  font-size: calc(8px * var(--zoom));
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.task-title,
.task-phase,
.task-freelance {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-bar.task-flags .task-title {
  max-width: calc(100% - calc(28px * var(--zoom)));
}

.task-title-text {
  display: inline-block;
  min-width: max-content;
  will-change: transform;
}

.task-bar.task-title-scrollable:hover .task-title-text,
.task-bar.task-title-scrollable:focus-visible .task-title-text {
  animation: task-title-scroll var(--task-scroll-duration, 4s) ease-in-out infinite alternate;
}

@keyframes task-title-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--task-scroll-distance, 0px)));
  }
}

.task-phase {
  margin-top: calc(1px * var(--zoom));
  padding: calc(1px * var(--zoom)) calc(4px * var(--zoom));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  font-size: calc(9px * var(--zoom));
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.task-container.single-task .task-phase {
  font-size: calc(9.5px * var(--zoom));
}

.task-bar[class*="-frame"] .task-phase {
  background: rgba(255, 255, 255, 0.62);
}

.task-freelance {
  font-size: calc(9px * var(--zoom));
  font-weight: 800;
  opacity: 0.92;
}

.cell-preview {
  position: fixed;
  z-index: 1300;
  width: min(328px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 52px rgba(23, 32, 51, 0.22);
  backdrop-filter: blur(12px);
  animation: modalRiseIn 0.16s ease both;
}

body.task-modal-open .cell-preview {
  display: none !important;
}

.cell-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.cell-preview-head span {
  color: var(--muted);
  font-size: 12px;
}

.cell-preview-list {
  display: grid;
  gap: 8px;
}

.cell-preview-task {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e7edf5;
  border-radius: 13px;
  background: #f8fafc;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.cell-preview-task:hover {
  background: #eef6ff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.08);
}

.cell-preview-main {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

.cell-preview-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding-top: 2px;
  font-size: 14px;
  line-height: 1;
}

.cell-preview-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  background: #fff;
}

.cell-preview-flag em {
  margin: 0;
  color: #536176;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.cell-preview-task strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.cell-preview-task em {
  margin-left: auto;
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  flex: 0 0 auto;
}

.cell-preview-task small {
  display: grid;
  gap: 3px;
  color: var(--muted);
  white-space: normal;
}

.cell-preview-task small span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-bar:hover {
  opacity: 0.85;
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

.task-bar[draggable="true"] {
  cursor: grab;
}

.task-bar.dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.day-cell.drag-over {
  outline: 3px dashed rgba(0, 113, 227, 0.55);
  outline-offset: -5px;
  background: rgba(0, 113, 227, 0.08);
}

.task-blue { background: #0071e3; color: #fff; }
.task-green { background: #30d158; color: #fff; }
.task-red { background: #ff3b30; color: #fff; }
.task-orange { background: #ff9500; color: #fff; }
.task-purple { background: #af52de; color: #fff; }
.task-yellow { background: #ffcc00; color: #1d1d1f; }
.task-pink { background: #ffb6d5; color: #7a2144; }
.task-teal { background: #5ac8fa; color: #fff; }
.task-brown { background: #a2845e; color: #fff; }
.task-black { background: #000; color: #fff; }
.task-indigo { background: #5856d6; color: #fff; }
.task-lime { background: #34c759; color: #fff; }

.task-bar.post-schedule-task {
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.78), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.task-bar.post-schedule-task .task-title {
  max-width: calc(100% - calc(28px * var(--zoom)));
}

.task-blue-frame { border: 2px solid #0071e3; background: rgba(0, 113, 227, 0.1); color: #0071e3; }
.task-green-frame { border: 2px solid #30d158; background: rgba(48, 209, 88, 0.1); color: #30d158; }
.task-red-frame { border: 2px solid #ff3b30; background: rgba(255, 59, 48, 0.1); color: #ff3b30; }
.task-orange-frame { border: 2px solid #ff9500; background: rgba(255, 149, 0, 0.1); color: #ff9500; }
.task-purple-frame { border: 2px solid #af52de; background: rgba(175, 82, 222, 0.1); color: #af52de; }
.task-yellow-frame { border: 2px solid #ffcc00; background: rgba(255, 204, 0, 0.15); color: #b8860b; }
.task-pink-frame { border: 2px solid #ff8fbd; background: rgba(255, 182, 213, 0.24); color: #9a2a55; }
.task-teal-frame { border: 2px solid #5ac8fa; background: rgba(90, 200, 250, 0.1); color: #5ac8fa; }
.task-brown-frame { border: 2px solid #a2845e; background: rgba(162, 132, 94, 0.1); color: #a2845e; }
.task-black-frame { border: 2px solid #000; background: rgba(0, 0, 0, 0.08); color: #000; }
.task-indigo-frame { border: 2px solid #5856d6; background: rgba(88, 86, 214, 0.1); color: #5856d6; }
.task-lime-frame { border: 2px solid #34c759; background: rgba(52, 199, 89, 0.1); color: #34c759; }

.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top left, rgba(0, 113, 227, 0.18), transparent 34%),
    rgba(15, 23, 42, 0.54);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(5px);
}

.modal[style*="flex"] {
  animation: modalFadeIn 0.18s ease both;
}

.modal[style*="flex"] .modal-content {
  animation: modalRiseIn 0.22s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.modal-content {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  padding: 24px;
  width: min(620px, 94vw);
  box-shadow: var(--shadow-pop);
  max-height: min(86vh, 920px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.auth-modal-content {
  width: 440px;
}

.task-modal-content {
  width: min(600px, 92vw);
  padding: 22px;
}

.task-modal-content > h3 {
  display: none;
}

#modalTitleInput[aria-invalid="true"] {
  border-color: #e33446 !important;
  box-shadow: 0 0 0 3px rgba(227, 52, 70, 0.14) !important;
}

.report-modal-content {
  width: min(1040px, 94vw);
  padding: 24px;
}

.job-code-modal-content {
  width: min(1120px, 94vw);
  padding: 22px;
  min-width: min(720px, 96vw);
  min-height: 520px;
  max-width: 98vw;
  max-height: 94vh;
  resize: both;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.yonetim-modal-content {
  width: min(920px, 92vw);
  padding: 24px;
}

.self-leave-modal-content {
  width: min(520px, 92vw);
}

.admin-leave-modal {
  z-index: 1120;
}

.admin-leave-modal-content {
  width: min(1040px, 94vw);
  max-height: 92vh;
  padding: 24px;
}

.admin-department-modal {
  z-index: 1120;
}

.admin-department-modal-content {
  width: min(1040px, 94vw);
  max-height: 92vh;
  padding: 24px;
}

.admin-department-modal-heading {
  align-items: center;
}

.admin-department-modal-heading h3 {
  margin: 0 0 4px;
  color: var(--ink);
}

.admin-department-modal-heading > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.department-management-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.department-management-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.department-management-toolbar strong {
  color: var(--ink);
  font-size: 18px;
}

.department-management-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.department-add-inline {
  display: flex;
  gap: 8px;
}

.department-add-inline input,
.admin-department-name-row input,
.admin-department-new-person-row input,
.admin-department-person-row input {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.department-add-inline input {
  width: min(270px, 34vw);
}

.department-add-inline button,
.admin-department-name-row button,
.admin-department-new-person-row button,
.admin-department-person-row button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.department-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

.department-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px;
  align-items: stretch;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}

.department-card:hover {
  border-color: #8fb4e4;
  background: #f7fbff;
}

.department-card-drag {
  display: grid;
  place-items: center;
  color: #8795a8;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -2px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.department-card-drag:active {
  cursor: grabbing;
}

.department-card-open {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 7px 14px 7px 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.department-card-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e8f1ff;
  color: #1857aa;
  font-size: 15px;
  font-weight: 900;
}

.department-card-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.department-card-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-card-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.department-card-arrow {
  color: #6b7a90;
  font-size: 24px;
}

.department-card-order {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  padding: 6px;
  gap: 5px;
  border-left: 1px solid #d7e1ee;
  background: #f7f9fc;
}

.department-card-order button {
  min-width: 0;
  min-height: 40px;
  padding: 0 7px;
  border: 1px solid #cbd8e8;
  border-radius: 8px;
  background: #fff;
  color: #1e3a5f;
  font-size: 10px;
  font-weight: 850;
  box-shadow: none;
}

.department-card-order button span {
  font-size: 15px;
}

.department-card-order button:hover:not(:disabled) {
  border-color: #2563eb;
  background: #e8f1ff;
  color: #1857aa;
}

.department-card-order button:disabled {
  cursor: not-allowed;
  opacity: 0.3;
}

@media (max-width: 620px) {
  .department-card {
    grid-template-columns: minmax(0, 1fr) 116px;
  }

  .department-card-order button {
    padding: 0 4px;
    font-size: 0;
  }

  .department-card-order button span {
    font-size: 18px;
  }
}

.department-card-end-dropzone,
.department-person-end-dropzone {
  height: 0;
  min-height: 0;
  overflow: hidden;
}

.department-card-end-dropzone.drag-over,
.department-person-end-dropzone.drag-over {
  height: 16px;
  min-height: 16px;
  margin-top: 8px;
  border: 1px dashed #2563eb;
  border-radius: 10px;
}

.admin-department-settings,
.admin-department-new-person,
.admin-department-people {
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #fff;
}

.admin-department-new-person,
.admin-department-people {
  margin-top: 14px;
}

.admin-department-new-person {
  background: #f2f7ff;
}

.admin-department-name-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 9px;
}

.admin-department-new-person-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1fr) auto;
  gap: 9px;
}

.admin-department-person-row {
  display: grid;
  grid-template-columns: 30px minmax(170px, 0.8fr) minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid #dfe6ef;
  border-radius: 13px;
  background: #fbfdff;
}

.admin-department-person-row + .admin-department-person-row {
  margin-top: 9px;
}

body.theme-dark .department-card,
body.theme-dark .admin-department-settings,
body.theme-dark .admin-department-new-person,
body.theme-dark .admin-department-people,
body.theme-dark .admin-department-person-row {
  border-color: #2b3950;
  background: #111b2b;
}

body.theme-dark .department-card:hover,
body.theme-dark .admin-department-new-person {
  background: #152238;
}

body.theme-dark .department-card-icon {
  background: #17335f;
  color: #9ec1ff;
}

body.theme-dark .department-management-toolbar strong,
body.theme-dark .department-card-copy strong,
body.theme-dark .admin-department-modal-heading h3 {
  color: #eef4ff;
}

.admin-leave-modal-heading {
  align-items: center;
}

.admin-leave-kicker {
  margin: 0 0 5px;
  color: #e33446;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.admin-leave-modal-heading h3 {
  margin: 0 0 4px;
  color: var(--ink);
}

.admin-leave-modal-heading > div > p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.modal-close-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.leave-people-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid var(--line);
}

.leave-people-toolbar > div {
  display: grid;
  gap: 3px;
}

.leave-people-toolbar strong {
  color: var(--ink);
  font-size: 18px;
}

.leave-people-toolbar > div span,
.leave-people-toolbar label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.leave-people-toolbar label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leave-people-toolbar select {
  min-width: 100px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.leave-people-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.leave-person-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid #d7e1ee;
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.leave-person-card:hover {
  border-color: #8fb4e4;
  background: #f7fbff;
  transform: translateY(-1px);
}

.leave-person-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8f1ff;
  color: #1857aa;
  font-size: 18px;
  font-weight: 900;
}

.leave-person-copy,
.leave-person-stats {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.leave-person-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leave-person-copy small,
.leave-person-stats small,
.leave-person-stats em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.leave-person-stats {
  min-width: 72px;
  text-align: right;
}

.leave-person-stats strong {
  color: #1857aa;
  font-size: 20px;
}

.leave-person-arrow {
  color: #6b7a90;
  font-size: 28px;
  font-weight: 400;
}

.admin-leave-summary {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) repeat(2, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-leave-summary > label,
.admin-leave-summary > div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 15px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f7faff;
}

.admin-leave-summary span,
.admin-leave-edit-grid label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.admin-leave-summary strong {
  color: #1857aa;
  font-size: 23px;
}

.admin-leave-summary select,
.admin-leave-edit-grid input,
.admin-leave-edit-grid select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.admin-leave-new,
.admin-leave-history {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #fff;
}

.admin-leave-new {
  background: #f2f7ff;
}

.admin-leave-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-leave-section-title strong {
  color: var(--ink);
  font-size: 16px;
}

.admin-leave-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.admin-leave-edit-grid {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(155px, 0.8fr) minmax(190px, 1.2fr);
  gap: 9px;
}

.admin-leave-edit-grid label {
  display: grid;
  gap: 5px;
}

.admin-leave-new-grid {
  grid-template-columns: minmax(130px, 0.7fr) minmax(130px, 0.7fr) minmax(155px, 0.8fr) minmax(190px, 1.2fr) auto;
  align-items: end;
}

.admin-leave-new-grid button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 800;
}

.admin-leave-record {
  padding: 14px;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fbfdff;
}

.admin-leave-record + .admin-leave-record {
  margin-top: 10px;
}

.admin-leave-record-date {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.admin-leave-record-readonly {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.admin-leave-record-readonly .admin-leave-record-date {
  margin-bottom: 0;
}

.admin-leave-record-summary {
  display: grid;
  gap: 4px;
}

.admin-leave-record-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.admin-leave-record-summary span {
  color: var(--muted);
  font-size: 12px;
}

.admin-leave-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.admin-leave-record-actions button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.admin-leave-empty {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

body.theme-dark .leave-person-card,
body.theme-dark .admin-leave-new,
body.theme-dark .admin-leave-history,
body.theme-dark .admin-leave-record,
body.theme-dark .admin-leave-summary > label,
body.theme-dark .admin-leave-summary > div,
body.theme-dark .modal-close-button {
  border-color: #2b3950;
  background: #111b2b;
}

body.theme-dark .leave-person-card:hover,
body.theme-dark .admin-leave-new {
  background: #152238;
}

body.theme-dark .leave-person-avatar {
  background: #17335f;
  color: #9ec1ff;
}

body.theme-dark .leave-person-copy strong,
body.theme-dark .admin-leave-modal-heading h3,
body.theme-dark .leave-people-toolbar strong,
body.theme-dark .admin-leave-section-title strong,
body.theme-dark .admin-leave-record-date,
body.theme-dark .admin-leave-record-summary strong,
body.theme-dark .modal-close-button {
  color: #eef4ff;
}

@media (max-width: 760px) {
  .department-card-grid,
  .admin-department-name-row,
  .admin-department-new-person-row,
  .admin-department-person-row {
    grid-template-columns: 1fr;
  }

  .department-management-toolbar,
  .department-add-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .department-add-inline input {
    width: 100%;
  }

  .admin-department-person-row .department-card-drag {
    display: none;
  }

  .leave-people-grid,
  .admin-leave-summary,
  .admin-leave-edit-grid,
  .admin-leave-new-grid {
    grid-template-columns: 1fr;
  }

  .leave-people-toolbar,
  .admin-leave-section-title {
    align-items: stretch;
    flex-direction: column;
  }

  .leave-person-card {
    grid-template-columns: 40px minmax(0, 1fr) auto 14px;
  }

  .leave-person-avatar {
    width: 40px;
    height: 40px;
  }

  .admin-leave-record-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-leave-record-readonly {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.modal-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.modal h3 {
  margin-bottom: 6px;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.modal-heading p {
  color: var(--muted);
  font-size: 14px;
}

.form-row { margin-bottom: 18px; }

.task-modal-content .form-row {
  margin-bottom: 14px;
}

.date-range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.item-row input:focus,
.item-row select:focus,
.add-new-box input:focus,
.add-new-box select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 216, 0.12);
}

.form-row textarea {
  resize: vertical;
  min-height: 80px;
}

.field-hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mini-calendar {
  padding: 12px;
  border: 1px solid #d7e1ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.mini-calendar-head {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mini-calendar-head strong {
  text-align: center;
  font-size: 16px;
  font-weight: 850;
}

.mini-calendar-head button {
  width: 36px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  font-size: 20px;
  line-height: 1;
}

.mini-calendar-weekdays,
.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 6px;
}

.mini-calendar-weekdays {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.mini-calendar-day {
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.mini-calendar-day:hover {
  background: #eef6ff;
  box-shadow: none;
}

.mini-calendar-day.selected {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 105, 216, 0.22);
}

.mini-calendar-day.active-planner-day {
  border-color: #eba417;
  box-shadow: 0 0 0 3px rgba(235, 164, 23, 0.2), 0 8px 18px rgba(23, 105, 216, 0.18);
}

.mini-calendar-day.today {
  border-color: #eba417;
}

.mini-calendar-day.muted {
  background: transparent;
  pointer-events: none;
}

.mini-calendar-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.mini-calendar-actions button {
  flex: 1;
  padding: 9px 10px;
}

.mini-calendar-selected {
  margin-top: 10px;
  color: #405878;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.hidden-support-field {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.day-planner {
  display: grid;
  gap: 12px;
}

.day-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-tab {
  padding: 9px 12px;
  border: 1px solid #d7e1ee;
  border-radius: 999px;
  background: #fff;
  color: #405878;
  box-shadow: none;
  font-size: 13px;
  font-weight: 850;
}

.day-tab.active {
  border-color: #eba417;
  background: #fff8df;
  color: var(--ink);
}

.day-tab.configured::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 999px;
  background: var(--brand-blue);
  vertical-align: middle;
}

.day-planner-empty {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.day-planner-empty.compact {
  padding: 10px 12px;
  grid-column: 1 / -1;
}

.day-plan-card {
  padding: 14px;
  border: 1px solid #d7e1ee;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fbff);
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.05);
}

.day-plan-card.single {
  border-color: #cbd9ea;
  background: #fff;
}

.day-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink);
}

.day-plan-head strong {
  font-size: 15px;
  font-weight: 900;
}

.day-plan-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.day-phase-input {
  margin-bottom: 10px;
}

.remove-active-days-btn {
  width: 100%;
  margin-bottom: 10px;
  color: #9f2d20;
  border-color: #f1b8af;
  background: #fff4f2;
}

.day-plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.day-plan-actions button {
  padding: 9px 10px;
  font-size: 13px;
}

.day-plan-actions .wide-action {
  grid-column: 1 / -1;
}

.day-people-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.day-person-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #dbe5f1;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.day-person-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.task-flags-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.billing-section {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) minmax(260px, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 8px;
  margin-bottom: 14px;
}

.billing-section input[type="text"] {
  width: 100%;
  min-height: 0;
  height: 46px;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  font-size: 14px;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f3f6fa;
  font-weight: 700;
  color: var(--text);
}

.mini-check input {
  width: 16px;
  height: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  min-height: 46px;
  padding: 8px 11px;
  background: #f3f6fa;
  border-radius: 14px;
  cursor: pointer;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.color-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.color-option {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.color-option.selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink);
}

.color-option.blue { background: #0071e3; }
.color-option.green { background: #30d158; }
.color-option.red { background: #ff3b30; }
.color-option.orange { background: #ff9500; }
.color-option.purple { background: #af52de; }
.color-option.yellow { background: #ffcc00; }
.color-option.pink { background: #ffb6d5; }
.color-option.teal { background: #5ac8fa; }
.color-option.brown { background: #a2845e; }
.color-option.black { background: #000; }
.color-option.indigo { background: #5856d6; }
.color-option.lime { background: #34c759; }

.ekip-section {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}
.ekip-section h4 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.post-crew-section { border-color: color-mix(in srgb, #af52de 35%, var(--line)); background: color-mix(in srgb, #af52de 5%, rgba(255, 255, 255, 0.72)); }
.post-crew-section h4 { margin-bottom: 4px; }
.post-crew-help { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.post-crew-checkboxes { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 14px; border: 1px solid #e2eaf4; border-radius: 14px; background: #fff; }
.post-crew-checkboxes .ekip-checkbox { min-width: 170px; }
.post-crew-empty { margin: 0; padding: 12px 14px; color: var(--muted); background: #f4f7fb; border-radius: 14px; font-size: 13px; }
.ekip-group {
  margin-bottom: 8px;
  border: 1px solid #e2eaf4;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.ekip-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: #f4f7fb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.ekip-group-title::after {
  content: "+";
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.ekip-group.open .ekip-group-title::after {
  content: "-";
}

.ekip-group-title em {
  margin-left: auto;
  color: #53647d;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.ekip-group-body {
  display: none;
  padding: 10px 14px 12px;
}

.ekip-group.open .ekip-group-body {
  display: block;
}

.ekip-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}

.ekip-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.ekip-checkbox .freelance-name-input {
  flex: 1;
  min-width: 160px;
  max-width: 260px;
  width: auto;
  height: auto;
  margin-left: auto;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  background: #fff;
}

.equipment-section {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.equipment-section h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.equipment-master-group {
  border: 1px solid #d7e3f1;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.equipment-master-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border: 0;
  background: #eaf5fb;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-align: left;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.equipment-master-title::after {
  content: "+";
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.equipment-master-group.open .equipment-master-title::after {
  content: "-";
}

.equipment-master-title em {
  margin-left: auto;
  color: #53647d;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.equipment-master-body {
  display: none;
  padding: 10px 12px 12px;
}

.equipment-master-group.open .equipment-master-body {
  display: block;
}

.equipment-group {
  margin-bottom: 8px;
  border: 1px solid #e2eaf4;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.equipment-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border: 0;
  background: #f4f7fb;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.equipment-group-title::after {
  content: "+";
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.equipment-group.open .equipment-group-title::after {
  content: "-";
}

.equipment-group-title em {
  margin-left: auto;
  color: #53647d;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.equipment-group-special {
  border-color: #fecaca;
  box-shadow: inset 3px 0 0 #ef4444;
}

.equipment-group-special .equipment-group-title {
  background: #fff1f2;
  color: #b91c1c;
}

.equipment-group-special .equipment-group-title em {
  color: #dc2626;
}

.equipment-group-body {
  display: none;
  padding: 8px 12px 12px;
  max-height: 280px;
  overflow: auto;
}

.equipment-group.open .equipment-group-body {
  display: block;
}

.equipment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 112px 150px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  color: var(--ink);
}

.equipment-name {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
}

.equipment-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-name input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.equipment-row input[type="number"] {
  width: 100%;
  height: 34px;
  padding: 6px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  text-align: right;
  font-size: 13px;
}

.equipment-mobile-stepper {
  display: grid;
  grid-template-columns: 34px minmax(32px, 1fr) 34px;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 2px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}

.equipment-mobile-stepper button {
  width: 34px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #f4f7fb;
  color: #172033;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
}

.equipment-mobile-stepper strong {
  color: #172033;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.equipment-mobile-stepper.disabled {
  opacity: 0.52;
}

.equipment-row:not(.selected) input[type="number"] {
  opacity: 0.52;
}

.equipment-type-options {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  color: #53647d;
  font-size: 12px;
  font-weight: 850;
}

.equipment-type-options label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.equipment-type-options input {
  width: 15px;
  height: 15px;
}

.equipment-total {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #eef6ff;
  color: #1d4168;
  font-size: 14px;
  font-weight: 850;
}

.equipment-total div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.equipment-total span {
  color: #53647d;
}

.equipment-total b {
  color: var(--ink);
}

.equipment-total-special span,
.equipment-total-special b {
  color: #dc2626;
}

.equipment-total-grand {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid #d7e3f1;
}

.equipment-total-grand span,
.equipment-total-grand b {
  color: #17375e;
  font-size: 15px;
}

.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.task-modal-content > .btn-row,
.yonetim-modal-content > .btn-row {
  position: sticky;
  bottom: -24px;
  z-index: 20;
  margin: 18px -24px -24px;
  padding: 12px 24px 18px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.72), #f8fafc 52%);
  border-top: 1px solid rgba(217, 224, 234, 0.7);
  backdrop-filter: blur(10px);
}

.task-modal-content > .btn-row {
  bottom: -22px;
  margin-inline: -22px;
  margin-bottom: -22px;
  padding-inline: 22px;
}

.btn-row button {
  flex: 1;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 700;
}

.btn-cancel { background: #eef2f7; color: #111827; }
.btn-save { background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark)); color: #fff; }
.btn-delete { background: linear-gradient(135deg, #ef5147, var(--danger)); color: #fff; }

.yonetim-modal-content > .btn-row {
  gap: 14px;
}

.yonetim-save-all {
  background: linear-gradient(135deg, #35c86f, var(--success));
  color: #fff;
}

.yonetim-close-btn {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  color: #fff;
}

.yonetim-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f3f6fa;
  overflow-x: auto;
  scrollbar-width: thin;
}

.yonetim-tab {
  flex: 0 0 auto;
  padding: 8px 13px;
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 13px;
  color: #516176;
  border-radius: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.yonetim-tab.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.08);
}

.yonetim-content { display: none; }
.yonetim-content.active {
  display: block;
  max-height: calc(88vh - 205px);
  overflow: auto;
  padding: 2px 3px 10px;
}

.inline-status {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef6ff;
  color: #24496f;
  border: 1px solid #cfe1f5;
  font-size: 13px;
  font-weight: 700;
}

.inline-status.error {
  background: #fff0ed;
  color: #b42318;
  border-color: #f3b6ad;
}

.inline-status.success {
  background: #eaf8f0;
  color: #17663b;
  border-color: #9ad7b1;
}

.job-code-modal-content .modal-heading {
  align-items: center;
  margin-bottom: 12px;
}

.job-code-primary-sections {
  display: inline-flex;
  gap: 4px;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faff;
}

.job-code-primary-sections button {
  height: 30px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.job-code-primary-sections button:hover:not(:disabled) {
  background: #eaf2ff;
  color: #1d4ed8;
}

.job-code-primary-sections button.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22);
}

.job-code-primary-sections button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.job-code-other-sheet {
  display: grid;
  gap: 5px;
  margin: 0;
  flex: 1 1 320px;
  min-width: 300px;
}

.job-code-other-sheet-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.job-code-other-sheet-row .secondary-btn {
  padding-inline: 10px;
}

.job-code-other-sheet-row .secondary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.job-code-toolbar label span,
.job-code-control-group > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.theme-dark .job-code-primary-sections {
  border-color: #34445e;
  background: #172235;
}

body.theme-dark .job-code-primary-sections button {
  color: #aeb9ca;
}

body.theme-dark .job-code-primary-sections button:hover:not(:disabled) {
  background: #21314a;
  color: #bfdbfe;
}

body.theme-dark .job-code-primary-sections button.active {
  border-color: #60a5fa;
  background: #2563eb;
  color: #fff;
}

.job-code-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-start;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
  box-shadow: 0 8px 22px rgba(30, 64, 175, 0.06);
}

.job-code-control-group,
.job-code-toolbar label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.job-code-year-control {
  flex: 0 0 104px;
}

.job-code-section-control {
  flex: 0 0 auto;
}

.job-code-search-field {
  flex: 1 1 170px;
  min-width: 150px;
}

.job-code-toolbar .secondary-btn {
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.job-code-toolbar input,
.job-code-toolbar select {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.job-code-zoom-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faff;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.job-code-zoom-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.job-code-format-tools {
  flex: 1 1 250px;
  min-width: 220px;
  max-width: 360px;
}

.job-code-format-row,
.job-code-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.job-code-format-row {
  height: 34px;
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #fff;
}

.job-code-actions-group {
  flex: 1 1 460px;
  min-width: min(100%, 420px);
}

.job-code-action-row {
  flex-wrap: wrap;
}

.job-code-bold-btn,
.job-code-color-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
}

.job-code-bold-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 900;
}

.job-code-bold-btn.active {
  background: var(--ink);
  color: #fff;
}

.job-code-color-palette {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding: 1px;
  scrollbar-width: thin;
}

.job-code-toolbar .job-code-color-palette .job-code-color-dot {
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border-radius: 999px;
  background: var(--dot-color, #fff);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.08);
}

.job-code-color-dot.empty::after {
  content: "";
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: #94a3b8;
  transform: rotate(-35deg);
}

.job-code-color-dot.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18), 0 0 0 1px #2563eb inset;
}

.secondary-btn.danger-light {
  color: #b42318;
  border-color: #f3b6ad;
  background: #fff7f5;
}

.job-code-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 2px 8px;
  padding: 0 2px;
}

.job-code-section-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.job-code-section-heading span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

body.theme-dark .job-code-toolbar,
body.theme-dark .job-code-format-row {
  border-color: #34445e;
  background: #172235;
}

body.theme-dark .job-code-toolbar input,
body.theme-dark .job-code-toolbar select,
body.theme-dark .job-code-bold-btn,
body.theme-dark .job-code-zoom-controls button {
  border-color: #455774;
  background: #111b2b;
  color: #edf3fb;
}

@media (max-width: 900px) {
  .job-code-year-control {
    flex: 1 1 100px;
  }

  .job-code-section-control {
    flex: 2 1 240px;
  }

  .job-code-primary-sections {
    display: flex;
  }

  .job-code-primary-sections button {
    flex: 1 1 50%;
  }

  .job-code-format-tools {
    order: 3;
    max-width: none;
  }
}

@media (max-width: 700px) {
  .job-code-modal-content .modal-heading {
    align-items: stretch;
  }

  .job-code-toolbar {
    gap: 9px;
    padding: 10px;
  }

  .job-code-year-control,
  .job-code-section-control,
  .job-code-format-tools,
  .job-code-search-field,
  .job-code-other-sheet,
  .job-code-actions-group {
    flex: 1 1 100%;
    min-width: 0;
    max-width: none;
  }

  .job-code-primary-sections,
  .job-code-action-row {
    width: 100%;
  }

  .job-code-other-sheet-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .job-code-action-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .job-code-action-row > * {
    flex: 0 0 auto;
  }

  .job-code-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.job-code-table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: auto;
  max-height: none;
  flex: 1 1 auto;
  min-height: 260px;
  --job-code-zoom: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.job-code-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: calc(3px * var(--job-code-zoom)) calc(4px * var(--job-code-zoom));
  font-size: calc(13px * var(--job-code-zoom));
}

.job-code-table td {
  min-width: calc(132px * var(--job-code-zoom));
  border: 1px solid #d6e0ec;
  border-radius: calc(10px * var(--job-code-zoom));
  padding: 0;
  background: #fff;
  overflow: hidden;
}

.job-code-table tr.active-row td {
  box-shadow: inset 3px 0 0 rgba(245, 158, 11, 0.9);
}

.job-code-table tr:first-child td,
.job-code-table tr.sticky-row td,
.job-code-table td.month-cell,
.job-code-table td.job-code-heading-cell {
  background: var(--table-baby-blue);
  font-weight: 800;
}

.job-code-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: calc(128px * var(--job-code-zoom));
  box-shadow: 2px 0 6px rgba(15, 23, 42, 0.04);
}

.job-code-table tr:first-child td {
  position: sticky;
  top: 0;
  z-index: 2;
}

.job-code-table tr:first-child td:first-child {
  z-index: 3;
}

.job-code-table tr.sticky-row td {
  position: sticky;
  top: calc(var(--sticky-top, 0px) * var(--job-code-zoom));
  z-index: 4;
}

.job-code-table tr.sticky-row td:first-child {
  z-index: 5;
}

.job-code-table td.has-custom-bg {
  background: var(--job-code-cell-bg);
}

.job-code-table td.bold-cell .job-code-cell-input {
  font-weight: 900;
}

.job-code-table td.job-code-project-cell .job-code-cell-input {
  color: #1d4ed8;
  font-weight: 800;
}

.job-code-table td.job-code-project-cell .job-code-cell-input:hover {
  background: #eff6ff;
}

.job-code-project-cell-wrap {
  display: flex;
  align-items: stretch;
  min-width: calc(132px * var(--job-code-zoom));
  border-radius: inherit;
  overflow: hidden;
}

.job-code-project-cell-wrap .job-code-cell-input {
  min-width: 0;
}

.job-code-open-project {
  flex: 0 0 calc(34px * var(--job-code-zoom));
  border: 0;
  border-left: 1px solid #dbeafe;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 900;
}

.job-code-open-project:hover {
  background: #dbeafe;
}

.job-code-table tr.job-code-invalid-month td {
  border-bottom-color: #f59e0b;
}

.job-code-table tr.job-code-invalid-month td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b, 1px 0 0 #e6edf5;
}

.job-code-cell-input {
  width: 100%;
  min-width: calc(132px * var(--job-code-zoom));
  border: 0;
  border-radius: inherit;
  padding: calc(9px * var(--job-code-zoom)) calc(10px * var(--job-code-zoom));
  background: transparent;
  color: var(--ink);
  font-size: calc(13px * var(--job-code-zoom));
  outline: none;
}

.job-code-cell-input:focus {
  background: #fff8dd;
  box-shadow: inset 0 0 0 2px #f59e0b;
}

.job-code-checkbox-wrap {
  min-width: calc(132px * var(--job-code-zoom));
  min-height: calc(38px * var(--job-code-zoom));
  display: grid;
  place-items: center;
}

.job-code-cell-checkbox {
  width: calc(18px * var(--job-code-zoom));
  height: calc(18px * var(--job-code-zoom));
  accent-color: #2563eb;
  cursor: pointer;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.item-row:hover {
  border-color: #c7d2e2;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.06);
  transform: translateY(-1px);
}

.row-simple {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.admin-sort-row.row-simple {
  grid-template-columns: auto minmax(220px, 1fr) auto;
}

.drag-handle {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 18px;
  font-weight: 900;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.drag-handle:active {
  cursor: grabbing;
}

.admin-sort-row.dragging {
  opacity: 0.58;
  transform: scale(0.995);
}

.admin-sort-row.drag-over {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.admin-people-group {
  margin-bottom: 14px;
}

.row-user {
  grid-template-columns: minmax(150px, 0.65fr) minmax(240px, 1.2fr) minmax(150px, 0.55fr) auto auto;
}

.row-holiday {
  grid-template-columns: minmax(160px, 0.45fr) minmax(240px, 1fr) auto;
}

.row-leave {
  grid-template-columns: minmax(180px, 0.85fr) minmax(130px, 0.5fr) minmax(130px, 0.5fr) minmax(180px, 0.75fr) minmax(210px, 1fr) auto;
}

.row-equipment {
  grid-template-columns: minmax(140px, 0.45fr) minmax(260px, 1fr) minmax(110px, 0.3fr) auto;
}

.item-row input,
.item-row select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
}

.item-row .role-select {
  flex: 0 0 132px;
}

.item-row .email-input {
  min-width: 220px;
}

.item-row .person-email-input {
  min-width: 210px;
}

.item-row .username-input {
  min-width: 150px;
}

.helper-copy {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
}

.small-empty {
  padding: 16px;
  text-align: left;
}

.item-row button {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.btn-add-small { background: linear-gradient(135deg, #31b86b, var(--success)); color: #fff; }
.btn-del-small { background: linear-gradient(135deg, #ef5147, var(--danger)); color: #fff; }

.add-new-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 9px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 15px;
  background: #f1f5f9;
}

.add-new-box input,
.add-new-box select {
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
}

.add-new-box button {
  justify-self: start;
  align-self: stretch;
  width: auto;
  min-width: 96px;
  height: 35px;
  min-height: 35px;
  padding: 0 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

#yonetimYetki .add-new-box {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px) auto;
}

#yonetimTatil .add-new-box {
  grid-template-columns: minmax(160px, 220px) minmax(240px, 1fr) auto;
}

#yonetimIzin .add-new-box {
  grid-template-columns: minmax(190px, 1fr) minmax(145px, 180px) minmax(145px, 180px) minmax(220px, 1fr) auto;
}

#yonetimEkipman .equipment-add-box {
  grid-template-columns: minmax(140px, 0.5fr) minmax(260px, 1fr) minmax(120px, 0.35fr) auto;
}

.backup-panel {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

#yonetimYedek.active {
  display: grid;
  gap: 16px;
}

.backup-panel h4 {
  font-size: 20px;
  margin-bottom: 8px;
}

.backup-panel p,
.backup-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.backup-panel button {
  margin: 18px 0 12px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 800;
}

.excel-backup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 12px;
  margin-top: 16px;
  max-width: 540px;
}

.excel-backup-grid label {
  display: grid;
  gap: 6px;
}

.excel-backup-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.excel-backup-grid select,
.excel-backup-grid input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 620px) {
  .excel-backup-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  html,
  body {
    background: #fff;
    width: auto;
  }

  body > *:not(#reportModal) {
    display: none !important;
  }

  #reportModal {
    position: static;
    display: block !important;
    background: #fff;
    padding: 0;
  }

  #reportModal .modal-content {
    width: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }

  #reportModal .btn-row,
  #reportModal .report-toolbar {
    display: none !important;
  }

  .report-table-wrap,
  .report-detail-wrap {
    max-height: none;
    overflow: visible;
  }

  .report-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 8.5px;
  }

  .report-table th,
  .report-table td {
    padding: 5px 6px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .report-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }

  .report-card {
    padding: 8px;
    border-radius: 10px;
    box-shadow: none;
  }

  .report-card strong {
    font-size: 18px;
  }

  .report-detail-block {
    margin-top: 10px;
  }

  .report-detail-block h4 {
    font-size: 13px;
    margin-bottom: 6px;
  }

  #reportModal h3 {
    font-size: 20px;
    margin: 0 0 2px;
  }
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(110px, 0.55fr) minmax(140px, 0.65fr) minmax(220px, 1fr) minmax(240px, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.report-filter-field-wide {
  grid-column: span 1;
}

.report-filter-field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-filter-field input,
.report-filter-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.report-filter-field input:focus,
.report-filter-field select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(23, 105, 216, 0.12);
}

.report-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(23, 105, 216, 0.10), transparent 42%),
    #fff;
  box-shadow: 0 10px 22px rgba(23, 32, 51, 0.06);
}

.report-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-card strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.report-note {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border: 1px solid #dbe7f6;
  border-radius: 14px;
  background: #f4f8ff;
  color: #49617f;
  font-size: 13px;
}

.report-table-wrap {
  max-height: min(52vh, 520px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.report-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.report-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-table th,
.report-table td {
  min-width: auto;
  height: auto;
  padding: 12px 14px;
  border-right: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  background: #fff;
}

.report-table th {
  position: sticky;
  left: auto;
  background: #edf3fb;
  color: #263449;
  font-weight: 800;
  box-shadow: none;
}

.report-table th:first-child,
.report-table th:nth-child(2) {
  left: auto;
  min-width: auto;
  width: auto;
  text-align: left;
  z-index: 1;
  box-shadow: none;
}

.report-table th:nth-child(n+3),
.report-table td:nth-child(n+3) {
  text-align: right;
  font-weight: 800;
}

.report-table tbody tr:nth-child(even) td {
  background: #fafcff;
}

.report-clickable-row {
  cursor: pointer;
}

.report-clickable-row:hover td {
  background: #eef6ff !important;
}

.report-person-row:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: -3px;
}

.report-interactive-value {
  display: inline-flex;
  min-width: 42px;
  justify-content: flex-end;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.report-person-row:hover .report-interactive-value,
.report-person-row:focus-visible .report-interactive-value {
  color: #1d4ed8;
}

.report-leave-entry {
  cursor: pointer;
}

.report-leave-dot {
  background: #f79009;
}

.report-leave-count {
  color: #b54708;
  background: #fffaeb;
}

.report-leave-schedule-target {
  position: relative;
  z-index: 2;
  box-shadow: inset 0 0 0 3px #2563eb !important;
  background: #eff6ff !important;
}

.report-person-project strong {
  color: var(--report-project-color, var(--ink));
}

.report-person-project {
  border-left: 4px solid var(--report-project-color, var(--line));
}

.report-person-project:hover strong,
.report-person-project:focus-visible strong {
  color: var(--report-project-color, var(--primary));
}

.report-person-preview-head {
  align-items: flex-start;
}

.report-person-preview-head span {
  max-width: 48%;
  text-align: right;
}

.report-project-open-icon {
  color: var(--dashboard-muted, var(--muted));
  font-size: 18px;
  line-height: 1;
}

.report-detail-block {
  margin-top: 18px;
}

.report-detail-block h4 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.report-detail-wrap {
  max-height: min(36vh, 360px);
}

.report-detail-table {
  min-width: 0;
  table-layout: fixed;
}

.report-detail-table th,
.report-detail-table td,
.report-detail-table th:nth-child(n+3),
.report-detail-table td:nth-child(n+3) {
  text-align: left;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
}

.report-detail-table th:nth-child(1),
.report-detail-table td:nth-child(1) {
  width: 16%;
}

.report-detail-table th:nth-child(2),
.report-detail-table td:nth-child(2) {
  width: 20%;
}

.report-detail-table th:nth-child(3),
.report-detail-table td:nth-child(3) {
  width: 26%;
}

.report-detail-table th:nth-child(4),
.report-detail-table td:nth-child(4) {
  width: 15%;
}

.report-detail-table th:nth-child(5),
.report-detail-table td:nth-child(5) {
  width: 11%;
}

.report-detail-table th:nth-child(6),
.report-detail-table td:nth-child(6) {
  width: 12%;
}

@media (max-width: 860px) {
  .header {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 10px 14px;
    gap: 10px;
  }

  .brand-logo {
    width: min(240px, 58vw);
    height: 36px;
  }

  .controls {
    justify-content: flex-start;
  }

  .modal {
    padding: 10px;
    align-items: stretch;
  }

  .modal-content,
  .task-modal-content,
  .report-modal-content,
  .yonetim-modal-content {
    width: 100%;
    max-height: calc(100vh - 20px);
    padding: 20px;
    border-radius: 20px;
  }

  .date-range-row,
  .report-toolbar,
  .item-row,
  .row-simple,
  .row-user,
  .row-holiday,
  .row-leave,
  .row-equipment,
  .add-new-box,
  #yonetimYetki .add-new-box,
  #yonetimTatil .add-new-box,
  #yonetimIzin .add-new-box,
  #yonetimEkipman .equipment-add-box {
    grid-template-columns: 1fr;
  }

  .report-filter-field-wide {
    grid-column: auto;
  }

  .yonetim-content.active {
    max-height: calc(100vh - 220px);
  }

  .item-row button {
    width: 100%;
  }

  .add-new-box button {
    width: auto;
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: min(220px, 72vw);
    height: 34px;
  }

  .header,
  .controls,
  .filter-panel {
    align-items: stretch;
  }

  .header {
    grid-template-columns: 1fr;
    padding: 10px 14px;
  }

  .controls {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .controls .user-pill {
    max-width: min(100%, 170px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .grid-wrapper {
    display: none;
  }

  .mobile-agenda {
    display: block;
    padding: 14px;
  }

  .notification-filters {
    grid-template-columns: 1fr;
  }

  .mobile-task-detail summary {
    align-items: flex-start;
  }
}

.notification-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(440px, 92vw);
  height: 100vh;
  background: #f8fafc;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 44px rgba(23, 32, 51, 0.16);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.notification-panel.open {
  transform: translateX(0);
}

.notification-panel-header {
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.notification-panel-header h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.notification-panel-header p {
  color: var(--muted);
  font-size: 13px;
}

.notification-list,
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.notification-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.20);
  backdrop-filter: blur(2px);
  z-index: 1190;
}

.activity-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 32, 51, 0.06);
}

.activity-item-clickable {
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.activity-item-clickable:hover {
  border-color: #9dbcf4;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.13);
  transform: translateY(-1px);
}

.activity-item-clickable:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
  border-color: #2563eb;
}

@media (prefers-reduced-motion: reduce) {
  .activity-item-clickable {
    transition: none;
  }
}

.activity-item-invoice {
  border-color: #b7ebc8;
  background: #f0fff5;
}

.activity-item-invoice .activity-title {
  color: #157a35;
}

.activity-item-closed {
  border-color: #ffc2c2;
  background: #fff4f4;
}

.activity-item-closed .activity-title {
  color: #c02626;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.activity-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.activity-detail {
  color: #3f4a5f;
  font-size: 13px;
  line-height: 1.45;
}

.activity-detail strong {
  font-weight: 600;
}

.notification-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  padding: 14px;
}

.notification-summary div {
  padding: 10px;
  border: 1px solid #dbe7f6;
  border-radius: 14px;
  background: #fff;
}

.notification-summary strong,
.notification-summary span {
  display: block;
}

.notification-summary strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.notification-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.undo-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 14px 10px;
  padding: 12px;
  border: 1px solid #facc15;
  border-radius: 14px;
  background: #fffbeb;
}

.undo-panel.muted {
  color: var(--muted);
  border-color: #e5eaf1;
  background: #fff;
}

.undo-panel strong,
.undo-panel span {
  display: block;
}

.undo-panel span {
  margin-top: 3px;
  color: #6b5c22;
  font-size: 12px;
}

.undo-panel button {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.auth-copy {
  color: var(--muted);
  margin-bottom: 18px;
  font-size: 14px;
}

.auth-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

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

@keyframes modalRiseIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.auth-mode-btn {
  background: #f5f5f7;
  color: #1d1d1f;
  border: 1px solid #d5d5da;
}

.auth-mode-btn.active {
  background: #0071e3;
  color: #fff;
  border-color: #0071e3;
}

.auth-message {
  min-height: 20px;
  font-size: 13px;
  color: #6e6e73;
}

.auth-message.error {
  color: #b42318;
}

.auth-message.success {
  color: #15713a;
}

.auth-help {
  margin-top: 12px;
  color: #6e6e73;
  font-size: 13px;
}

.link-btn {
  width: 100%;
  margin-top: 14px;
  padding: 0;
  background: transparent;
  color: #0071e3;
  border: none;
  font-size: 14px;
}

.link-btn:hover {
  background: transparent;
  color: #005bb5;
  text-decoration: underline;
}

.link-btn:disabled {
  cursor: not-allowed;
  color: #7a8798;
  text-decoration: none;
  opacity: 0.68;
}

.link-btn:disabled:hover {
  color: #7a8798;
  text-decoration: none;
}

.add-new-box {
  padding: 16px;
  background: #f5f5f7;
  border-radius: 8px;
  margin-top: 16px;
}

.add-new-box input,
.add-new-box select {
  width: 100%;
  margin-bottom: 12px;
}

.dept-spacer {
  height: 18px;
  background: #f4f6f9;
  border-top: 3px solid #aeb4bd;
  border-bottom: 3px solid #aeb4bd;
}

.dept-spacer td {
  background: #f4f6f9;
  height: 18px;
  border-top: 3px solid #aeb4bd;
  border-bottom: 3px solid #aeb4bd;
}

/* Final compact polish for laptop screens */
.header {
  padding: 6px 12px;
  gap: 10px;
  grid-template-columns: minmax(145px, 280px) minmax(0, 1fr);
}

.brand {
  gap: 10px;
}

.brand-logo {
  width: clamp(145px, 20vw, 280px);
  height: 30px;
}

.header .user-pill,
.header .sync-status {
  padding: 5px 9px;
  font-size: 11px;
}

.header select,
.header button {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.header .zoom-controls {
  padding: 2px 6px;
}

.filter-panel {
  padding: 6px 14px;
  gap: 8px;
  max-height: 74px;
}

.filter-panel input,
.filter-panel select {
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 12px;
}

.filter-panel button {
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 12px;
}

.task-modal-content {
  width: min(560px, 92vw);
  padding: 18px;
}

.yonetim-modal-content {
  width: min(860px, 92vw);
}

.yonetim-content.active {
  max-height: calc(100vh - 230px);
}

.row-leave {
  grid-template-columns:
    minmax(145px, 1fr)
    minmax(118px, 0.55fr)
    minmax(118px, 0.55fr)
    minmax(150px, 0.8fr)
    minmax(150px, 1fr)
    auto;
  gap: 6px;
  padding: 6px 8px;
}

.row-leave .btn-del-small {
  min-width: 44px;
  padding-inline: 10px;
}

#yonetimIzin .add-new-box {
  grid-template-columns:
    minmax(145px, 1fr)
    minmax(118px, 0.55fr)
    minmax(118px, 0.55fr)
    minmax(150px, 0.9fr)
    auto;
}

.task-modal-content .form-row {
  margin-bottom: 11px;
}

.task-modal-content > .btn-row {
  margin: 14px -18px -18px;
  padding: 9px 18px 12px;
  gap: 10px;
  bottom: -18px;
}

.task-modal-content > .btn-row button {
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 14px;
}

.mini-calendar {
  padding: 9px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.mini-calendar-head {
  grid-template-columns: 32px 1fr 32px;
  gap: 6px;
  margin-bottom: 7px;
}

.mini-calendar-head strong {
  font-size: 15px;
}

.mini-calendar-head button {
  width: 32px;
  height: 30px;
  border-radius: 10px;
  font-size: 18px;
}

.mini-calendar-weekdays,
.mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(30px, 1fr));
  gap: 5px;
}

.mini-calendar-weekdays {
  margin-bottom: 5px;
  font-size: 11px;
}

.mini-calendar-day {
  min-height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.mini-calendar-actions {
  gap: 8px;
  margin-top: 9px;
}

.mini-calendar-actions button {
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.mini-calendar-selected {
  margin-top: 8px;
  font-size: 11px;
}

.day-planner,
.day-tabs {
  gap: 8px;
}

.day-tab {
  padding: 7px 10px;
  font-size: 12px;
}

.day-plan-card {
  padding: 11px;
  border-radius: 15px;
}

.day-plan-head {
  margin-bottom: 8px;
}

tr.dept-last-row > td {
  border-bottom: 3px solid #aeb4bd !important;
}

.admin-sort-dropzone {
  height: 10px;
  margin: 2px 0 8px;
  border: 1px dashed transparent;
  border-radius: 10px;
  transition: all 0.16s ease;
}

.admin-sort-dropzone.drag-over {
  height: 34px;
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.empty-state,
.loading-state {
  padding: 40px;
  text-align: center;
  color: #6e6e73;
}

@media (max-width: 900px) {
  .header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .grid-wrapper {
    height: calc(100vh - 178px);
  }
}

/* Final task modal readability pass */
.task-modal-content {
  width: min(640px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  overflow-x: hidden;
  padding: 16px;
}

.task-modal-content,
.task-modal-content * {
  box-sizing: border-box;
}

.task-modal-content .form-row {
  margin-bottom: 8px;
}

.task-modal-content .form-row label {
  margin-bottom: 4px;
  font-size: 12px;
}

.task-modal-content .form-row input,
.task-modal-content .form-row select,
.task-modal-content .form-row textarea {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 11px;
  font-size: 14px;
}

.task-modal-content .form-row textarea {
  min-height: 58px;
}

.task-modal-content .color-form-row,
.task-modal-content .color-grid,
.task-modal-content #colorGrid {
  display: none !important;
}

.task-modal-content > .btn-row {
  margin: 12px -16px -16px;
  padding: 8px 16px 10px;
  gap: 10px;
  bottom: -16px;
}

.task-modal-content > .btn-row button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.task-modal-content .mini-calendar {
  padding: 8px;
  border-radius: 13px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.task-modal-content .mini-calendar-head {
  grid-template-columns: 28px 1fr 28px;
  gap: 5px;
  margin-bottom: 5px;
}

.task-modal-content .mini-calendar-head button {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 15px;
}

.task-modal-content .mini-calendar-head strong {
  font-size: 14px;
}

.task-modal-content .mini-calendar-weekdays,
.task-modal-content .mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(26px, 1fr));
  gap: 4px;
}

.task-modal-content .mini-calendar-weekdays {
  margin-bottom: 4px;
  font-size: 10.5px;
}

.task-modal-content .mini-calendar-day {
  min-height: 27px;
  border-radius: 8px;
  font-size: 12px;
}

.task-modal-content .mini-calendar-actions {
  gap: 5px;
  margin-top: 6px;
}

.task-modal-content .mini-calendar-actions button {
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 12px;
}

.task-modal-content .mini-calendar-selected {
  margin-top: 6px;
  font-size: 11px;
}

.task-modal-content .day-plan-card.single {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 8px;
  align-items: stretch;
  padding: 10px;
}

.task-modal-content .day-plan-card.single .day-plan-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.task-modal-content .day-plan-card.single .day-phase-input {
  margin-bottom: 0;
  min-width: 0;
}

.task-modal-content .day-plan-card.single .remove-active-days-btn {
  width: auto;
  margin-bottom: 0;
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 11px;
  font-size: 12px;
  align-self: stretch;
}

.task-modal-content .task-flags-row {
  gap: 7px;
  margin-bottom: 8px;
}

.task-modal-content .checkbox-row,
.task-modal-content .mini-check {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 11px;
  font-size: 13px;
}

.task-modal-content .checkbox-row input,
.task-modal-content .mini-check input {
  width: 16px;
  height: 16px;
}

.task-modal-content .billing-section {
  grid-template-columns: minmax(130px, 0.3fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.task-modal-content .billing-section input[type="text"] {
  height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}

.task-modal-content .equipment-section {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  overflow-x: hidden;
}

.task-modal-content .equipment-section h4 {
  font-size: 14px;
  margin-bottom: 8px;
}

.task-modal-content .equipment-master-title {
  padding: 9px 11px;
  font-size: 14px;
  border-radius: 13px;
}

.task-modal-content .equipment-master-body {
  padding: 8px;
  overflow-x: hidden;
}

.task-modal-content .equipment-group {
  border-radius: 12px;
}

.task-modal-content .equipment-group-title {
  padding: 8px 10px;
  font-size: 12px;
}

.task-modal-content .equipment-group-body {
  padding: 6px 8px 8px;
  max-height: 240px;
  overflow-x: hidden;
  overflow-y: auto;
}

.task-modal-content .equipment-row {
  display: grid;
  grid-template-columns: minmax(215px, 1fr) 42px 62px 102px;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
}

.task-modal-content .equipment-name {
  gap: 6px;
  font-size: 12px;
  line-height: 1.18;
  min-width: 0;
}

.task-modal-content .equipment-name span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.task-modal-content .equipment-name input {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.task-modal-content .equipment-row input[type="number"] {
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 4px 5px;
  border-radius: 8px;
  font-size: 12px;
}

.task-modal-content .equipment-type-options {
  gap: 5px;
  font-size: 10.5px;
  justify-content: flex-end;
}

.task-modal-content .equipment-type-options label {
  gap: 3px;
}

.task-modal-content .equipment-type-options input {
  width: 12px;
  height: 12px;
}

.task-modal-content .equipment-total {
  margin-top: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

@media (max-width: 660px) {
  .task-modal-content .equipment-row {
    grid-template-columns: minmax(170px, 1fr) 40px 58px;
  }

  .task-modal-content .equipment-type-options {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .task-modal-content .day-plan-card.single,
  .task-modal-content .billing-section {
    grid-template-columns: 1fr;
  }
}

/* Compact task modal final override: keep it readable without horizontal drift. */
.modal .task-modal-content {
  width: min(760px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  padding: 14px;
  overflow-x: hidden !important;
}

.task-modal-content > h3 {
  display: none;
}

.task-modal-content > * {
  max-width: 100%;
}

.task-modal-content .form-row {
  margin-bottom: 6px;
}

.task-modal-content .form-row label {
  margin-bottom: 3px;
  font-size: 11px;
}

.task-modal-content .form-row input,
.task-modal-content .form-row select,
.task-modal-content .form-row textarea {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.task-modal-content #modalDesc {
  min-height: 48px;
  height: 48px;
}

.task-modal-content .mini-calendar {
  padding: 7px 9px;
  border-radius: 12px;
}

.task-modal-content .mini-calendar-head {
  grid-template-columns: 26px 1fr 26px;
  margin-bottom: 4px;
}

.task-modal-content .mini-calendar-head button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 14px;
}

.task-modal-content .mini-calendar-head strong {
  font-size: 13px;
}

.task-modal-content .mini-calendar-weekdays,
.task-modal-content .mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: 3px;
}

.task-modal-content .mini-calendar-weekdays {
  font-size: 10px;
}

.task-modal-content .mini-calendar-day {
  min-height: 24px;
  border-radius: 8px;
  font-size: 11.5px;
}

.task-modal-content .mini-calendar-actions button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11.5px;
}

.task-modal-content .mini-calendar-selected {
  margin-top: 5px;
  font-size: 10.5px;
}

.task-modal-content .day-plan-card.single {
  grid-template-columns: minmax(0, 1fr) 118px !important;
  gap: 7px;
  padding: 8px;
  border-radius: 13px;
}

.task-modal-content .day-plan-card.single .day-plan-head {
  grid-column: 1 / -1;
}

.task-modal-content .day-plan-card.single .day-phase-input {
  min-height: 33px;
  height: 33px;
  padding: 6px 9px;
  font-size: 12.5px;
}

.task-modal-content .day-plan-card.single .remove-active-days-btn {
  min-height: 33px;
  height: 33px;
  padding: 5px 7px;
  border-radius: 10px;
  font-size: 11.5px;
  white-space: nowrap;
}

.task-modal-content .task-flags-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 7px;
}

.task-modal-content .checkbox-row,
.task-modal-content .mini-check {
  min-height: 34px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12.5px;
}

.task-modal-content .billing-section {
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.task-modal-content .billing-section input[type="text"] {
  height: 34px;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 12.5px;
}

.task-modal-content .equipment-section {
  margin-top: 8px;
  padding: 9px;
  border-radius: 13px;
  overflow-x: hidden !important;
}

.task-modal-content .equipment-section h4 {
  margin-bottom: 7px;
  font-size: 13px;
}

.task-modal-content .equipment-master-title {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
}

.task-modal-content .equipment-master-body,
.task-modal-content .equipment-group-body {
  overflow-x: hidden !important;
}

.task-modal-content .equipment-group-title {
  padding: 7px 9px;
  font-size: 11.5px;
}

.task-modal-content .equipment-row {
  grid-template-columns: minmax(275px, 1fr) 38px 56px 82px !important;
  gap: 5px;
  padding: 3px 0;
}

.task-modal-content .equipment-name {
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.18;
}

.task-modal-content .equipment-name span {
  display: block;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

.task-modal-content .equipment-name input {
  width: 14px;
  height: 14px;
}

.task-modal-content .equipment-row input[type="number"] {
  height: 26px;
  min-height: 26px;
  padding: 3px 4px;
  border-radius: 8px;
  font-size: 11.5px;
}

.task-modal-content .equipment-type-options {
  gap: 4px;
  font-size: 10px;
}

.task-modal-content .equipment-type-options input {
  width: 11px;
  height: 11px;
}

.task-modal-content .equipment-total {
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 12.5px;
}

.task-modal-content > .btn-row {
  margin: 10px -14px -14px;
  padding: 8px 14px;
  gap: 8px;
}

.task-modal-content > .btn-row button {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 12px;
  font-size: 12.5px;
}

@media (max-width: 720px) {
  .modal .task-modal-content {
    width: min(680px, calc(100vw - 18px));
    max-width: calc(100vw - 18px);
  }

  .task-modal-content .equipment-row {
    grid-template-columns: minmax(210px, 1fr) 36px 54px !important;
  }

  .task-modal-content .equipment-type-options {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 20px;
  }
}

@media (max-width: 560px) {
  .task-modal-content .task-flags-row,
  .task-modal-content .billing-section,
  .task-modal-content .day-plan-card.single {
    grid-template-columns: 1fr !important;
  }
}

/* Final compact pass for the task modal: no sideways drift, readable equipment. */
#taskModal {
  overflow-x: hidden;
}

#taskModal .task-modal-content {
  width: min(760px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  overflow-x: hidden !important;
  padding: 14px 16px;
}

#taskModal .task-modal-content,
#taskModal .task-modal-content * {
  box-sizing: border-box;
}

#taskModal .task-modal-content > * {
  max-width: 100%;
}

#taskModal .task-modal-content > h3 {
  display: none;
}

#taskModal .task-modal-content .form-row {
  margin-bottom: 6px;
}

#taskModal .task-modal-content .form-row label {
  margin-bottom: 3px;
  font-size: 11.5px;
}

#taskModal .task-modal-content .form-row input,
#taskModal .task-modal-content .form-row select {
  min-height: 32px;
  height: 32px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 13px;
}

#taskModal .task-modal-content .form-row textarea {
  min-height: 44px;
  height: 44px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
}

#taskModal .task-modal-content .color-form-row,
#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: none !important;
}

#taskModal .task-modal-content .mini-calendar {
  padding: 6px 8px;
  border-radius: 12px;
}

#taskModal .task-modal-content .mini-calendar-head {
  grid-template-columns: 26px 1fr 26px;
  margin-bottom: 3px;
}

#taskModal .task-modal-content .mini-calendar-head button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 14px;
}

#taskModal .task-modal-content .mini-calendar-head strong {
  font-size: 13px;
}

#taskModal .task-modal-content .mini-calendar-weekdays,
#taskModal .task-modal-content .mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: 3px;
}

#taskModal .task-modal-content .mini-calendar-weekdays {
  margin-bottom: 3px;
  font-size: 10px;
}

#taskModal .task-modal-content .mini-calendar-day {
  min-height: 24px;
  border-radius: 8px;
  font-size: 11.5px;
}

#taskModal .task-modal-content .mini-calendar-actions {
  margin-top: 5px;
  gap: 5px;
}

#taskModal .task-modal-content .mini-calendar-actions button {
  min-height: 26px;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 11.5px;
}

#taskModal .task-modal-content .mini-calendar-selected {
  margin-top: 5px;
  font-size: 10.5px;
}

#taskModal .task-modal-content .day-planner {
  display: grid;
  gap: 7px;
}

#taskModal .task-modal-content .day-plan-card.single {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px !important;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
}

#taskModal .task-modal-content .day-plan-card.single .day-plan-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

#taskModal .task-modal-content .day-plan-card.single .day-phase-input {
  min-height: 32px;
  height: 32px;
  margin: 0;
  padding: 5px 9px;
  font-size: 12.5px;
}

#taskModal .task-modal-content .day-plan-card.single .remove-active-days-btn {
  min-height: 32px;
  height: 32px;
  width: auto;
  margin: 0;
  padding: 5px 8px;
  align-self: stretch;
  border-radius: 10px;
  font-size: 11.5px;
  white-space: nowrap;
}

#taskModal .task-modal-content #modalDesc {
  min-height: 48px;
  height: 48px;
}

#taskModal .task-modal-content .task-flags-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 7px;
}

#taskModal .task-modal-content .checkbox-row,
#taskModal .task-modal-content .mini-check {
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12.5px;
}

#taskModal .task-modal-content .checkbox-row input,
#taskModal .task-modal-content .mini-check input {
  width: 15px;
  height: 15px;
}

#taskModal .task-modal-content .billing-section {
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 7px;
  margin-bottom: 8px;
}

#taskModal .task-modal-content .billing-section input[type="text"] {
  min-height: 32px;
  height: 32px;
  padding: 5px 9px;
  border-radius: 10px;
  font-size: 12.5px;
}

#taskModal .task-modal-content .ekip-section,
#taskModal .task-modal-content .equipment-section {
  margin-top: 8px;
  padding: 9px 10px;
  overflow-x: hidden !important;
  border-radius: 13px;
}

#taskModal .task-modal-content .ekip-section h4,
#taskModal .task-modal-content .equipment-section h4 {
  margin-bottom: 7px;
  font-size: 14px;
}

#taskModal .task-modal-content .equipment-master-title {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
}

#taskModal .task-modal-content .equipment-master-body {
  padding: 7px;
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-group-title {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 11px;
  font-size: 11.5px;
}

#taskModal .task-modal-content .equipment-group-body {
  max-height: 230px;
  padding: 6px 7px 8px;
  overflow-x: hidden !important;
  overflow-y: auto;
}

#taskModal .task-modal-content .equipment-row {
  grid-template-columns: minmax(260px, 1fr) 38px 58px 84px !important;
  gap: 5px;
  min-width: 0;
  padding: 3px 0;
}

#taskModal .task-modal-content .equipment-name {
  width: 100%;
  min-width: 0;
  gap: 6px;
  font-size: 11.8px;
  line-height: 1.15;
}

#taskModal .task-modal-content .equipment-name span {
  display: block;
  max-width: none !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
  white-space: normal !important;
}

#taskModal .task-modal-content .equipment-name input {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

#taskModal .task-modal-content .equipment-row input[type="number"] {
  width: 100%;
  min-height: 26px;
  height: 26px;
  padding: 3px 4px;
  border-radius: 8px;
  font-size: 11.5px;
}

#taskModal .task-modal-content .equipment-type-options {
  min-width: 0;
  gap: 4px;
  justify-content: flex-end;
  font-size: 10px;
  line-height: 1;
}

#taskModal .task-modal-content .equipment-type-options label {
  gap: 2px;
}

#taskModal .task-modal-content .equipment-type-options input {
  width: 11px;
  height: 11px;
}

#taskModal .task-modal-content .equipment-total {
  margin-top: 7px;
  padding: 8px 10px;
  border-radius: 11px;
  font-size: 12.5px;
}

#taskModal .task-modal-content > .btn-row {
  bottom: -14px;
  margin: 10px -16px -14px;
  padding: 8px 16px;
  gap: 8px;
}

#taskModal .task-modal-content > .btn-row button {
  min-height: 34px;
  padding: 6px 9px;
  border-radius: 11px;
  font-size: 12.5px;
}

@media (max-width: 760px) {
  #taskModal .task-modal-content {
    width: min(700px, calc(100vw - 18px));
    padding: 12px;
  }

  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(190px, 1fr) 36px 54px 74px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    font-size: 9.5px;
  }
}

@media (max-width: 560px) {
  #taskModal .task-modal-content .task-flags-row,
  #taskModal .task-modal-content .billing-section,
  #taskModal .task-modal-content .day-plan-card.single {
    grid-template-columns: 1fr !important;
  }

  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 36px 52px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Final task modal polish: compact, readable, no horizontal drift. */
#taskModal,
#taskModal .modal-content,
#taskModal .task-modal-content {
  max-width: calc(100vw - 24px) !important;
  overflow-x: hidden !important;
}

#taskModal .task-modal-content {
  width: min(820px, calc(100vw - 24px)) !important;
  padding: 12px 14px !important;
}

#taskModal .task-modal-content,
#taskModal .task-modal-content * {
  box-sizing: border-box;
}

#taskModal .task-modal-content > * {
  max-width: 100%;
}

#taskModal .task-modal-content .form-row {
  margin-bottom: 5px !important;
}

#taskModal .task-modal-content .form-row label {
  margin-bottom: 2px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

#taskModal .task-modal-content .form-row input,
#taskModal .task-modal-content .form-row select {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 9px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .form-row textarea {
  min-height: 42px !important;
  height: 42px !important;
  padding: 6px 9px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .color-form-row,
#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: none !important;
}

#taskModal .task-modal-content .mini-calendar {
  padding: 5px 7px !important;
  border-radius: 11px !important;
}

#taskModal .task-modal-content .mini-calendar-head {
  grid-template-columns: 24px 1fr 24px !important;
  margin-bottom: 3px !important;
}

#taskModal .task-modal-content .mini-calendar-head button {
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

#taskModal .task-modal-content .mini-calendar-head strong {
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .mini-calendar-weekdays,
#taskModal .task-modal-content .mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(22px, 1fr)) !important;
  gap: 3px !important;
}

#taskModal .task-modal-content .mini-calendar-weekdays {
  margin-bottom: 2px !important;
  font-size: 9.5px !important;
}

#taskModal .task-modal-content .mini-calendar-day {
  min-height: 23px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .mini-calendar-actions {
  margin-top: 5px !important;
  gap: 5px !important;
}

#taskModal .task-modal-content .mini-calendar-actions button {
  min-height: 25px !important;
  padding: 3px 7px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .mini-calendar-selected {
  margin-top: 4px !important;
  font-size: 10px !important;
}

#taskModal .task-modal-content .day-planner {
  gap: 6px !important;
}

#taskModal .task-modal-content .day-plan-card.single {
  grid-template-columns: minmax(0, 1fr) 110px !important;
  gap: 6px !important;
  padding: 7px !important;
  border-radius: 11px !important;
}

#taskModal .task-modal-content .day-plan-card.single .day-plan-head {
  grid-column: 1 / -1 !important;
  margin-bottom: 0 !important;
}

#taskModal .task-modal-content .day-plan-card.single .day-phase-input {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .day-plan-card.single .remove-active-days-btn {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 9px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content #modalDesc {
  min-height: 46px !important;
  height: 46px !important;
}

#taskModal .task-modal-content .task-flags-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 6px !important;
}

#taskModal .task-modal-content .checkbox-row,
#taskModal .task-modal-content .mini-check {
  min-height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .checkbox-row input,
#taskModal .task-modal-content .mini-check input {
  width: 14px !important;
  height: 14px !important;
}

#taskModal .task-modal-content .billing-section {
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 6px !important;
  margin-bottom: 7px !important;
}

#taskModal .task-modal-content .billing-section input[type="text"] {
  min-height: 30px !important;
  height: 30px !important;
  padding: 4px 8px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .ekip-section,
#taskModal .task-modal-content .equipment-section {
  margin-top: 7px !important;
  padding: 8px 9px !important;
  border-radius: 12px !important;
}

#taskModal .task-modal-content .ekip-section h4,
#taskModal .task-modal-content .equipment-section h4 {
  margin-bottom: 6px !important;
  font-size: 13.5px !important;
}

#taskModal .task-modal-content .equipment-master-title {
  min-height: 35px !important;
  padding: 7px 9px !important;
  border-radius: 11px !important;
  font-size: 13.5px !important;
}

#taskModal .task-modal-content .equipment-master-body {
  padding: 6px !important;
}

#taskModal .task-modal-content .equipment-group-title {
  min-height: 33px !important;
  padding: 6px 8px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .equipment-group-body {
  max-height: 230px !important;
  padding: 5px 6px 7px !important;
}

#taskModal .task-modal-content .equipment-row {
  grid-template-columns: minmax(360px, 1fr) 34px 48px 78px !important;
  gap: 4px !important;
  padding: 2px 0 !important;
}

#taskModal .task-modal-content .equipment-name {
  gap: 5px !important;
  font-size: 11.5px !important;
  line-height: 1.12 !important;
}

#taskModal .task-modal-content .equipment-name span {
  display: block !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
}

#taskModal .task-modal-content .equipment-name input {
  width: 13px !important;
  height: 13px !important;
}

#taskModal .task-modal-content .equipment-row input[type="number"] {
  min-height: 24px !important;
  height: 24px !important;
  padding: 2px 3px !important;
  border-radius: 7px !important;
  font-size: 10.5px !important;
}

#taskModal .task-modal-content .equipment-type-options {
  gap: 3px !important;
  justify-content: flex-end !important;
  font-size: 9.5px !important;
}

#taskModal .task-modal-content .equipment-type-options label {
  gap: 2px !important;
}

#taskModal .task-modal-content .equipment-type-options input {
  width: 10px !important;
  height: 10px !important;
}

#taskModal .task-modal-content .equipment-total {
  margin-top: 6px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content > .btn-row {
  margin: 9px -14px -12px !important;
  padding: 7px 14px !important;
  gap: 7px !important;
}

#taskModal .task-modal-content > .btn-row button {
  min-height: 32px !important;
  padding: 5px 8px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

@media (max-width: 880px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(290px, 1fr) 32px 46px 72px !important;
  }
}

@media (max-width: 700px) {
  #taskModal .task-modal-content {
    width: min(680px, calc(100vw - 18px)) !important;
    padding: 11px !important;
  }

  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(210px, 1fr) 32px 44px 68px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    font-size: 9px !important;
  }
}

/* Final task modal squeeze pass */
#taskModal,
#taskModal .modal-content,
#taskModal .task-modal-content {
  overflow-x: hidden !important;
}

#taskModal .task-modal-content {
  width: min(820px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  padding: 14px 16px !important;
  box-sizing: border-box !important;
}

#taskModal .task-modal-content *,
#taskModal .task-modal-content *::before,
#taskModal .task-modal-content *::after {
  box-sizing: border-box;
}

#taskModal .task-modal-content > * {
  max-width: 100%;
}

#taskModal .task-modal-content > h3 {
  display: none !important;
}

#taskModal .task-modal-content .form-row {
  margin-bottom: 6px !important;
}

#taskModal .task-modal-content .form-row label {
  margin-bottom: 3px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .form-row input,
#taskModal .task-modal-content .form-row select {
  min-height: 31px !important;
  height: 31px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .form-row textarea {
  min-height: 44px !important;
  height: 44px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .color-form-row,
#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: none !important;
}

#taskModal .task-modal-content .mini-calendar {
  padding: 6px 8px !important;
  border-radius: 12px !important;
}

#taskModal .task-modal-content .mini-calendar-head {
  grid-template-columns: 26px 1fr 26px !important;
  margin-bottom: 3px !important;
}

#taskModal .task-modal-content .mini-calendar-head button {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}

#taskModal .task-modal-content .mini-calendar-head strong {
  font-size: 13px !important;
}

#taskModal .task-modal-content .mini-calendar-weekdays,
#taskModal .task-modal-content .mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(24px, 1fr)) !important;
  gap: 3px !important;
}

#taskModal .task-modal-content .mini-calendar-weekdays {
  margin-bottom: 3px !important;
  font-size: 10px !important;
}

#taskModal .task-modal-content .mini-calendar-day {
  min-height: 24px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}

#taskModal .task-modal-content .mini-calendar-actions {
  margin-top: 5px !important;
  gap: 5px !important;
}

#taskModal .task-modal-content .mini-calendar-actions button {
  min-height: 26px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}

#taskModal .task-modal-content .mini-calendar-selected {
  margin-top: 5px !important;
  font-size: 10.5px !important;
}

#taskModal .task-modal-content .day-planner {
  gap: 6px !important;
}

#taskModal .task-modal-content .day-plan-card.single {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 112px !important;
  gap: 5px !important;
  padding: 7px !important;
  border-radius: 12px !important;
}

#taskModal .task-modal-content .day-plan-card.single .day-plan-head {
  grid-column: 1 / -1 !important;
  margin-bottom: 0 !important;
}

#taskModal .task-modal-content .day-plan-card.single .day-phase-input {
  min-height: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .day-plan-card.single .remove-active-days-btn {
  min-height: 30px !important;
  height: 30px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 5px 7px !important;
  align-self: stretch !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

#taskModal .task-modal-content #modalDesc {
  min-height: 46px !important;
  height: 46px !important;
}

#taskModal .task-modal-content .task-flags-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 7px !important;
}

#taskModal .task-modal-content .checkbox-row,
#taskModal .task-modal-content .mini-check {
  min-height: 31px !important;
  padding: 5px 8px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .checkbox-row input,
#taskModal .task-modal-content .mini-check input {
  width: 15px !important;
  height: 15px !important;
}

#taskModal .task-modal-content .billing-section {
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 7px !important;
  margin-bottom: 7px !important;
}

#taskModal .task-modal-content .billing-section input[type="text"] {
  min-height: 31px !important;
  height: 31px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .ekip-section,
#taskModal .task-modal-content .equipment-section {
  margin-top: 8px !important;
  padding: 8px 9px !important;
  border-radius: 13px !important;
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-master-title {
  min-height: 36px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

#taskModal .task-modal-content .equipment-master-body {
  padding: 7px !important;
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-group-title {
  min-height: 34px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .equipment-group-body {
  max-height: 230px !important;
  padding: 6px 7px 8px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#taskModal .task-modal-content .equipment-row {
  grid-template-columns: minmax(360px, 1fr) 30px 44px 68px !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 2px 0 !important;
  align-items: center !important;
}

#taskModal .task-modal-content .equipment-name {
  width: 100% !important;
  min-width: 0 !important;
  gap: 5px !important;
  font-size: 11.5px !important;
  line-height: 1.12 !important;
}

#taskModal .task-modal-content .equipment-name span {
  display: block !important;
  max-width: none !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

#taskModal .task-modal-content .equipment-name input {
  flex: 0 0 auto !important;
  width: 13px !important;
  height: 13px !important;
}

#taskModal .task-modal-content .equipment-row input[type="number"] {
  width: 100% !important;
  min-height: 23px !important;
  height: 23px !important;
  padding: 2px 3px !important;
  border-radius: 7px !important;
  font-size: 10.5px !important;
}

#taskModal .task-modal-content .equipment-type-options {
  min-width: 0 !important;
  gap: 3px !important;
  justify-content: flex-end !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
}

#taskModal .task-modal-content .equipment-type-options label {
  gap: 2px !important;
}

#taskModal .task-modal-content .equipment-type-options input {
  width: 10px !important;
  height: 10px !important;
}

#taskModal .task-modal-content .equipment-total {
  margin-top: 7px !important;
  padding: 8px 10px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content > .btn-row {
  margin: 10px -16px -14px !important;
  padding: 7px 16px !important;
  gap: 8px !important;
}

#taskModal .task-modal-content > .btn-row button {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

@media (max-width: 820px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(250px, 1fr) 28px 42px 64px !important;
  }
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .task-flags-row,
  #taskModal .task-modal-content .billing-section,
  #taskModal .task-modal-content .day-plan-card.single {
    grid-template-columns: 1fr !important;
  }

  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 34px 50px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    padding-left: 18px !important;
  }
}

/* Final override: the task modal color picker must stay visible. */
#taskModal .task-modal-content .color-form-row {
  display: block !important;
}

#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(22px, 1fr)) !important;
  gap: 6px !important;
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .color-grid,
  #taskModal .task-modal-content #colorGrid {
    grid-template-columns: repeat(6, minmax(24px, 1fr)) !important;
  }
}

/* Final modal layout fix: no equipment overlap, resizable modal windows. */
@media (min-width: 720px) {
  .modal .modal-content {
    resize: both !important;
    overflow: auto !important;
    min-width: min(420px, calc(100vw - 32px));
    min-height: 280px;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px) !important;
  }

  #taskModal .task-modal-content {
    resize: both !important;
    overflow: auto !important;
    container-type: inline-size;
    width: min(860px, calc(100vw - 32px)) !important;
    min-width: min(430px, calc(100vw - 32px));
    min-height: 360px;
  }
}

#taskModal .task-modal-content .equipment-group-body {
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-row {
  grid-template-columns: minmax(180px, 1fr) 58px 82px minmax(118px, max-content) !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: center !important;
}

#taskModal .task-modal-content .equipment-row input[type="number"] {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#taskModal .task-modal-content .equipment-type-options {
  min-width: 118px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  white-space: nowrap !important;
  font-size: 11.5px !important;
}

#taskModal .task-modal-content .equipment-type-options label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

#taskModal .task-modal-content .equipment-type-options input {
  flex: 0 0 auto !important;
  margin: 0 !important;
  width: 14px !important;
  height: 14px !important;
}

@container (max-width: 560px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 54px 72px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    padding-left: 22px !important;
  }
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 54px 72px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
    padding-left: 22px !important;
  }
}

/* Custom resize handle: supports horizontal and vertical modal resizing reliably. */
@media (min-width: 720px) {
  .modal .modal-content {
    position: relative !important;
    overflow: auto !important;
    overflow-x: auto !important;
    resize: none !important;
  }

  #taskModal .modal-content,
  #taskModal .task-modal-content {
    overflow-x: auto !important;
  }

  .modal-resize-handle {
    position: sticky;
    right: 0;
    bottom: 0;
    float: right;
    width: 18px;
    height: 18px;
    margin: 8px -4px -4px 8px;
    border-right: 3px solid #64748b;
    border-bottom: 3px solid #64748b;
    border-bottom-right-radius: 4px;
    cursor: nwse-resize;
    opacity: 0.72;
    z-index: 10;
  }

  .modal-resize-handle:hover,
  .modal-content.is-resizing .modal-resize-handle {
    opacity: 1;
    border-color: #2563eb;
  }

  .modal-content.is-resizing {
    user-select: none;
  }
}

/* Restores task colors and adds sortable equipment category headers. */
#taskModal .task-modal-content .color-form-row {
  display: block !important;
}

#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 9px !important;
}

#taskModal .task-modal-content .color-option {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  flex: 0 0 36px !important;
  border-radius: 8px !important;
}

.equipment-category-admin-group {
  margin-bottom: 12px;
}

.equipment-category-title {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
  border: 1px solid #d8e3f0;
  border-radius: 12px;
  background: #eef5fb;
  cursor: grab;
}

.equipment-category-title::after {
  content: none !important;
}

.equipment-category-title span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.equipment-category-title.dragging,
.equipment-category-title.drag-over {
  cursor: grabbing;
}

.equipment-category-dropzone {
  margin-top: 6px;
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .color-grid,
  #taskModal .task-modal-content #colorGrid {
    grid-template-columns: repeat(6, minmax(24px, 1fr)) !important;
  }

  .equipment-category-title {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .equipment-category-title em {
    grid-column: 2;
    margin-left: 0;
  }
}

/* Final pass: keep the task editor compact without horizontal drift. */
#taskModal,
#taskModal .modal-content,
#taskModal .task-modal-content {
  overflow-x: hidden !important;
}

#taskModal .task-modal-content {
  width: min(820px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  padding: 14px 16px !important;
}

#taskModal .task-modal-content *,
#taskModal .task-modal-content *::before,
#taskModal .task-modal-content *::after {
  box-sizing: border-box;
}

#taskModal .task-modal-content > h3 {
  display: none !important;
}

#taskModal .task-modal-content .form-row {
  margin-bottom: 6px !important;
}

#taskModal .task-modal-content .form-row label {
  margin-bottom: 3px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .form-row input,
#taskModal .task-modal-content .form-row select {
  min-height: 31px !important;
  height: 31px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .form-row textarea,
#taskModal .task-modal-content #modalDesc {
  min-height: 44px !important;
  height: 44px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  font-size: 12.5px !important;
}

#taskModal .task-modal-content .color-form-row,
#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: none !important;
}

#taskModal .task-modal-content .mini-calendar {
  padding: 6px 8px !important;
  border-radius: 12px !important;
}

#taskModal .task-modal-content .mini-calendar-head {
  grid-template-columns: 26px 1fr 26px !important;
  margin-bottom: 3px !important;
}

#taskModal .task-modal-content .mini-calendar-head button {
  width: 26px !important;
  height: 26px !important;
  min-height: 26px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}

#taskModal .task-modal-content .mini-calendar-head strong {
  font-size: 13px !important;
}

#taskModal .task-modal-content .mini-calendar-weekdays,
#taskModal .task-modal-content .mini-calendar-grid {
  grid-template-columns: repeat(7, minmax(24px, 1fr)) !important;
  gap: 3px !important;
}

#taskModal .task-modal-content .mini-calendar-weekdays {
  margin-bottom: 3px !important;
  font-size: 10px !important;
}

#taskModal .task-modal-content .mini-calendar-day {
  min-height: 24px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}

#taskModal .task-modal-content .mini-calendar-actions {
  margin-top: 5px !important;
  gap: 5px !important;
}

#taskModal .task-modal-content .mini-calendar-actions button {
  min-height: 26px !important;
  padding: 4px 7px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
}

#taskModal .task-modal-content .mini-calendar-selected {
  margin-top: 5px !important;
  font-size: 10.5px !important;
}

#taskModal .task-modal-content .day-planner {
  gap: 6px !important;
}

#taskModal .task-modal-content .day-plan-card.single {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 112px !important;
  gap: 5px !important;
  padding: 7px !important;
  border-radius: 12px !important;
}

#taskModal .task-modal-content .day-plan-card.single .day-plan-head {
  grid-column: 1 / -1 !important;
  margin-bottom: 0 !important;
}

#taskModal .task-modal-content .day-plan-card.single .day-phase-input {
  min-height: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .day-plan-card.single .remove-active-days-btn {
  min-height: 30px !important;
  height: 30px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 5px 7px !important;
  align-self: stretch !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

#taskModal .task-modal-content .task-flags-row {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-bottom: 7px !important;
}

#taskModal .task-modal-content .checkbox-row,
#taskModal .task-modal-content .mini-check {
  min-height: 31px !important;
  padding: 5px 8px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .checkbox-row input,
#taskModal .task-modal-content .mini-check input {
  width: 15px !important;
  height: 15px !important;
}

#taskModal .task-modal-content .billing-section {
  grid-template-columns: 128px minmax(0, 1fr) !important;
  gap: 7px !important;
  margin-bottom: 7px !important;
}

#taskModal .task-modal-content .billing-section input[type="text"] {
  min-height: 31px !important;
  height: 31px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content .ekip-section,
#taskModal .task-modal-content .equipment-section {
  margin-top: 8px !important;
  padding: 8px 9px !important;
  border-radius: 13px !important;
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-master-title {
  min-height: 36px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

#taskModal .task-modal-content .equipment-master-body {
  padding: 7px !important;
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-group-title {
  min-height: 34px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
}

#taskModal .task-modal-content .equipment-group-body {
  max-height: 230px !important;
  padding: 6px 7px 8px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#taskModal .task-modal-content .equipment-row {
  grid-template-columns: minmax(360px, 1fr) 30px 44px 68px !important;
  gap: 4px !important;
  min-width: 0 !important;
  padding: 2px 0 !important;
  align-items: center !important;
}

#taskModal .task-modal-content .equipment-name {
  width: 100% !important;
  min-width: 0 !important;
  gap: 5px !important;
  font-size: 11.5px !important;
  line-height: 1.12 !important;
}

#taskModal .task-modal-content .equipment-name span {
  display: block !important;
  max-width: none !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

#taskModal .task-modal-content .equipment-name input {
  flex: 0 0 auto !important;
  width: 13px !important;
  height: 13px !important;
}

#taskModal .task-modal-content .equipment-row input[type="number"] {
  width: 100% !important;
  min-height: 23px !important;
  height: 23px !important;
  padding: 2px 3px !important;
  border-radius: 7px !important;
  font-size: 10.5px !important;
}

#taskModal .task-modal-content .equipment-type-options {
  min-width: 0 !important;
  gap: 3px !important;
  justify-content: flex-end !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
}

#taskModal .task-modal-content .equipment-type-options label {
  gap: 2px !important;
}

#taskModal .task-modal-content .equipment-type-options input {
  width: 10px !important;
  height: 10px !important;
}

#taskModal .task-modal-content .equipment-total {
  margin-top: 7px !important;
  padding: 8px 10px !important;
  border-radius: 11px !important;
  font-size: 12px !important;
}

#taskModal .task-modal-content > .btn-row {
  margin: 10px -16px -14px !important;
  padding: 7px 16px !important;
  gap: 8px !important;
}

#taskModal .task-modal-content > .btn-row button {
  min-height: 32px !important;
  padding: 5px 9px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
}

@media (max-width: 820px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(250px, 1fr) 28px 42px 64px !important;
  }
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .task-flags-row,
  #taskModal .task-modal-content .billing-section,
  #taskModal .task-modal-content .day-plan-card.single {
    grid-template-columns: 1fr !important;
  }

  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 34px 50px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    padding-left: 18px !important;
  }
}

/* EOF override: keep the task modal color picker visible after compact modal rules. */
#taskModal .task-modal-content .color-form-row {
  display: block !important;
}

#taskModal .task-modal-content .color-grid,
#taskModal .task-modal-content #colorGrid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(22px, 1fr)) !important;
  gap: 6px !important;
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .color-grid,
  #taskModal .task-modal-content #colorGrid {
    grid-template-columns: repeat(6, minmax(24px, 1fr)) !important;
  }
}

/* Absolute final modal layout fix: keep equipment controls separated and windows resizable. */
@media (min-width: 720px) {
  .modal .modal-content {
    resize: both !important;
    overflow: auto !important;
    min-width: min(420px, calc(100vw - 32px));
    min-height: 280px;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px) !important;
  }

  #taskModal .task-modal-content {
    resize: both !important;
    overflow: auto !important;
    container-type: inline-size;
    width: min(860px, calc(100vw - 32px)) !important;
    min-width: min(430px, calc(100vw - 32px));
    min-height: 360px;
  }
}

#taskModal .task-modal-content .equipment-group-body {
  overflow-x: hidden !important;
}

#taskModal .task-modal-content .equipment-row {
  grid-template-columns: minmax(180px, 1fr) 58px 82px minmax(118px, max-content) !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: center !important;
}

#taskModal .task-modal-content .equipment-row input[type="number"] {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

#taskModal .task-modal-content .equipment-type-options {
  min-width: 118px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  white-space: nowrap !important;
  font-size: 11.5px !important;
}

#taskModal .task-modal-content .equipment-type-options label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

#taskModal .task-modal-content .equipment-type-options input {
  flex: 0 0 auto !important;
  margin: 0 !important;
  width: 14px !important;
  height: 14px !important;
}

@container (max-width: 560px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 54px 72px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    padding-left: 22px !important;
  }
}

@media (max-width: 620px) {
  #taskModal .task-modal-content .equipment-row {
    grid-template-columns: minmax(0, 1fr) 54px 72px !important;
  }

  #taskModal .task-modal-content .equipment-type-options {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    justify-content: flex-start !important;
    padding-left: 22px !important;
  }
}

/* Final resize appearance: hide the inner helper and use the outer corner only. */
@media (min-width: 720px) {
  .modal .modal-content,
  #taskModal .task-modal-content {
    resize: none !important;
    overflow: auto !important;
    overflow-x: auto !important;
    position: relative !important;
  }

  .modal-resize-handle,
  .modal-resize-handle:hover,
  .modal-content.is-resizing .modal-resize-handle {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    float: none !important;
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    border: 0 !important;
    pointer-events: auto !important;
    background:
      linear-gradient(135deg, transparent 0 48%, #64748b 48% 56%, transparent 56% 100%),
      linear-gradient(135deg, transparent 0 66%, #64748b 66% 74%, transparent 74% 100%) !important;
    box-shadow: none !important;
    opacity: 0.78 !important;
    cursor: nwse-resize !important;
    z-index: 1200 !important;
  }

  .modal-resize-handle:hover,
  .modal-resize-handle.is-resizing {
    opacity: 1 !important;
    background:
      linear-gradient(135deg, transparent 0 48%, #2563eb 48% 56%, transparent 56% 100%),
      linear-gradient(135deg, transparent 0 66%, #2563eb 66% 74%, transparent 74% 100%) !important;
  }
}

/* Management equipment accordion: category appears once in the header. */
#yonetimEkipman .equipment-category-admin-group {
  margin-bottom: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

#yonetimEkipman .equipment-category-title {
  grid-template-columns: auto minmax(220px, 1fr) auto !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
  padding: 8px 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: #fff !important;
  cursor: default !important;
}

#yonetimEkipman .equipment-category-title input[data-equipment-category-name-edit] {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

#yonetimEkipman .equipment-category-toggle {
  width: auto;
  min-width: 92px;
  min-height: 34px;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #53647d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
}

#yonetimEkipman .equipment-category-toggle::after {
  content: "+";
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

#yonetimEkipman .equipment-category-admin-group.open .equipment-category-toggle::after {
  content: "-";
}

#yonetimEkipman .equipment-category-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#yonetimEkipman .equipment-category-admin-body {
  display: none;
  margin-top: 8px;
  padding: 10px 12px 12px;
  border: 1px solid #d8e3f0;
  border-top: 1px solid #dbe6f3;
  border-radius: 14px;
  background: #fff;
}

#yonetimEkipman .equipment-category-admin-group.open .equipment-category-admin-body {
  display: block;
}

#yonetimEkipman .equipment-category-dropzone {
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

#yonetimEkipman .equipment-category-dropzone.drag-over {
  min-height: 14px;
  height: 14px;
  margin: 8px 0;
  border: 1px dashed #2563eb;
  border-radius: 10px;
}

#yonetimEkipman .row-equipment {
  grid-template-columns: minmax(260px, 1fr) minmax(120px, 0.24fr) auto !important;
}

@media (max-width: 760px) {
  #yonetimEkipman .row-equipment {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 0.36fr) auto !important;
  }

  #yonetimEkipman .equipment-category-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #yonetimEkipman .equipment-category-toggle em {
    grid-column: 1;
  }

}

/* Professional UI consolidation: one compact, corporate control language. */
:root {
  --ui-primary: #1f5fbf;
  --ui-primary-hover: #194f9f;
  --ui-success: #218653;
  --ui-success-hover: #1a7045;
  --ui-danger: #dc3f35;
  --ui-danger-hover: #bd342c;
  --ui-control-bg: #ffffff;
  --ui-control-soft: #f5f7fa;
  --ui-control-border: #cfd8e6;
  --ui-control-border-strong: #b9c6d8;
  --ui-text: #172033;
  --ui-muted: #5c6a7f;
  --ui-radius: 10px;
  --ui-row-radius: 12px;
  --ui-control-height: 34px;
  --ui-action-height: 38px;
  --ui-focus: rgba(31, 95, 191, 0.14);
}

body {
  background: linear-gradient(180deg, #f7f8fb 0%, #eef2f7 100%);
  color: var(--ui-text);
  letter-spacing: 0;
}

button,
select,
input,
textarea {
  letter-spacing: 0;
}

button {
  min-height: var(--ui-control-height);
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius);
  background: var(--ui-primary);
  color: #fff;
  box-shadow: none;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

button:hover {
  transform: none;
  box-shadow: none;
  background: var(--ui-primary-hover);
}

button:active {
  transform: none;
}

.secondary-btn,
.btn-cancel,
.yonetim-close-btn {
  background: var(--ui-control-bg);
  color: var(--ui-text);
  border: 1px solid var(--ui-control-border);
}

.secondary-btn:hover,
.btn-cancel:hover,
.yonetim-close-btn:hover {
  background: var(--ui-control-soft);
  border-color: var(--ui-control-border-strong);
  color: var(--ui-text);
}

.btn-save,
.yonetim-save-all,
#yonetimBtn {
  background: var(--ui-primary);
  color: #fff;
}

.btn-save:hover,
.yonetim-save-all:hover,
#yonetimBtn:hover {
  background: var(--ui-primary-hover);
}

.btn-add-small {
  background: var(--ui-success);
  color: #fff;
}

.btn-add-small:hover {
  background: var(--ui-success-hover);
}

.btn-delete,
.btn-del-small,
.secondary-btn.danger-light {
  background: var(--ui-danger);
  color: #fff;
  border-color: transparent;
}

.btn-delete:hover,
.btn-del-small:hover,
.secondary-btn.danger-light:hover {
  background: var(--ui-danger-hover);
  color: #fff;
}

.header {
  padding: 9px 16px;
  border-bottom: 1px solid #dfe6ef;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.06);
}

.controls,
.filter-panel,
.job-code-toolbar,
.report-toolbar,
.notification-filters {
  gap: 8px;
}

.header .user-pill,
.header .sync-status,
.controls select,
.controls > button,
.filter-panel input,
.filter-panel select,
.filter-panel button,
.notification-filters input,
.notification-filters select,
.notification-panel button,
.report-toolbar button,
.job-code-toolbar button,
.job-code-toolbar input,
.job-code-toolbar select {
  height: var(--ui-control-height);
  min-height: var(--ui-control-height);
  border-radius: var(--ui-radius);
  font-size: 13px;
}

.header .user-pill,
.header .sync-status {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-width: 1px;
  font-weight: 700;
  box-shadow: none;
}

.header .user-pill {
  background: #f4f7fb;
  color: #2d3c51;
  border-color: #d7e0ec;
}

.header .sync-status {
  background: #f9f4e7;
  color: #765a1c;
  border-color: #e9d5a3;
}

.header .sync-status.online {
  background: #edf8f2;
  color: #23613f;
  border-color: #b6dec5;
}

.header .sync-status.error {
  background: #fff1ef;
  color: #a5362f;
  border-color: #efc2bd;
}

.controls select,
.filter-panel input,
.filter-panel select,
.notification-filters input,
.notification-filters select,
.job-code-toolbar input,
.job-code-toolbar select,
.report-filter-field input,
.report-filter-field select,
.form-row input,
.form-row select,
.form-row textarea,
.item-row input,
.item-row select,
.add-new-box input,
.add-new-box select {
  border-color: var(--ui-control-border);
  border-radius: var(--ui-radius);
  background: #fff;
  color: var(--ui-text);
  box-shadow: none;
}

.controls select,
.filter-panel input,
.filter-panel select,
.notification-filters input,
.notification-filters select,
.job-code-toolbar input,
.job-code-toolbar select {
  padding: 0 12px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.item-row input:focus,
.item-row select:focus,
.add-new-box input:focus,
.add-new-box select:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.notification-filters input:focus,
.notification-filters select:focus {
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 3px var(--ui-focus);
}

.zoom-controls,
.job-code-zoom-controls {
  height: var(--ui-control-height);
  padding: 3px 6px;
  border: 1px solid var(--ui-control-border);
  border-radius: 999px;
  background: #f4f7fb;
  gap: 6px;
}

.zoom-controls button,
.job-code-zoom-controls button {
  width: 28px;
  min-width: 28px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid var(--ui-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ui-text);
  font-size: 15px;
  box-shadow: none;
}

.zoom-controls button:hover,
.job-code-zoom-controls button:hover {
  background: #edf2f8;
  border-color: var(--ui-control-border-strong);
}

.zoom-controls span,
.job-code-zoom-controls span {
  min-width: 42px;
  color: var(--ui-text);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.unread-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--ui-danger);
  font-size: 11px;
}

.filter-panel {
  margin: 12px 16px;
  padding: 10px 12px;
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.04);
}

.modal-content {
  border: 1px solid #dfe6ef;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(23, 32, 51, 0.22);
}

.modal h3 {
  letter-spacing: 0;
  font-weight: 800;
}

.modal-heading {
  margin-bottom: 18px;
}

.modal-heading p,
.form-row label,
.helper-copy {
  color: var(--ui-muted);
}

.yonetim-tabs {
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: #f4f7fb;
  border-color: #dfe6ef;
}

.yonetim-tab {
  height: 34px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ui-muted);
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  font-weight: 760;
}

.yonetim-tab:hover {
  background: #eaf0f7;
  color: var(--ui-text);
}

.yonetim-tab.active {
  color: var(--ui-text);
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.08);
}

.item-row {
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-color: #dce5f0;
  border-radius: var(--ui-row-radius);
  background: #fbfdff;
  box-shadow: none;
}

.item-row:hover {
  transform: none;
  border-color: var(--ui-control-border-strong);
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.05);
}

.drag-handle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  background: #fff;
  color: #596a82;
  border: 1px solid var(--ui-control-border);
  box-shadow: none;
  font-size: 16px;
  font-weight: 800;
}

.drag-handle:hover {
  background: #eef4fb;
  color: var(--ui-primary);
  border-color: #b9c9dd;
}

.item-row input,
.item-row select,
.add-new-box input,
.add-new-box select {
  height: 35px;
  min-height: 35px;
  padding: 0 10px;
  font-size: 13px;
}

.item-row button {
  height: 35px;
  min-height: 35px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.btn-del-small {
  min-width: 58px;
}

.add-new-box {
  gap: 8px;
  padding: 12px;
  border: 1px solid #e5eaf2;
  border-radius: 12px;
  background: #f6f8fb;
}

.add-new-box button {
  height: 35px;
  min-height: 35px;
  width: auto;
  min-width: 96px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1;
}

#yonetimEkipman .equipment-category-title {
  border-color: #dce5f0 !important;
  border-radius: var(--ui-row-radius) !important;
  background: #fbfdff !important;
}

#yonetimEkipman .equipment-category-title input[data-equipment-category-name-edit] {
  height: 35px;
  min-height: 35px;
  padding: 0 10px;
  font-size: 13px;
  border-color: var(--ui-control-border);
  border-radius: 10px;
}

#yonetimEkipman .equipment-category-toggle {
  min-width: 86px;
  min-height: 35px;
  height: 35px;
  padding: 0 10px;
  border-radius: 10px;
  background: #fff;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 720;
}

.btn-row {
  gap: 10px;
  justify-content: flex-end;
}

.task-modal-content > .btn-row,
.yonetim-modal-content > .btn-row {
  margin-top: 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid #e1e7f0;
}

.btn-row button {
  flex: 0 0 auto;
  min-width: 116px;
  height: var(--ui-action-height);
  min-height: var(--ui-action-height);
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
}

.yonetim-modal-content > .btn-row button {
  min-width: 132px;
}

.checkbox-row,
.mini-check {
  border-color: #dce5f0;
  border-radius: 10px;
  background: #fbfdff;
}

@media (max-width: 760px) {
  .btn-row,
  .task-modal-content > .btn-row,
  .yonetim-modal-content > .btn-row {
    justify-content: stretch;
  }

  .btn-row button,
  .yonetim-modal-content > .btn-row button {
    flex: 1 1 0;
    min-width: 0;
  }

  .add-new-box button {
    justify-self: start;
    width: auto;
  }
}

/* Table header polish: keep the sticky name header separator as one clean line. */
thead {
  box-shadow: none;
}

th {
  border-bottom: 1px solid #cbd8e6;
}

th:nth-child(2) {
  box-shadow: 2px 0 0 0 var(--table-baby-blue-strong);
}

th:first-child {
  box-shadow: none;
}

th.today-col {
  box-shadow: inset 0 0 0 2px #eba417;
}

/* Top workspace redesign: compact, consistent controls without changing behavior. */
.header {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  min-height: 58px;
  gap: 18px;
  padding: 9px 18px;
  border-bottom: 1px solid #dbe3ee;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 18px rgba(19, 31, 49, 0.05);
}

.brand {
  align-self: stretch;
  padding-right: 16px;
  border-right: 1px solid #e3e9f2;
}

.brand-logo {
  width: clamp(190px, 16vw, 245px);
  height: 36px;
}

.brand-logo img {
  max-height: 32px;
  object-position: left center;
}

.controls {
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: flex-end;
  padding: 2px 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd6e6 transparent;
}

.controls::-webkit-scrollbar {
  height: 4px;
}

.controls::-webkit-scrollbar-thumb {
  background: #cbd6e6;
  border-radius: 999px;
}

.controls > * {
  flex: 0 0 auto;
}

.header .user-pill,
.header .sync-status,
.controls select,
.controls > button {
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #d6dfeb;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1;
}

.header .user-pill,
.header .sync-status {
  padding: 0 11px;
}

.header .user-pill {
  max-width: 255px;
  background: #f7f9fc;
  color: #324156;
}

.header .sync-status {
  background: #fff8e8;
  color: #765719;
  border-color: #ead7aa;
}

.header .sync-status.online {
  background: #eef9f3;
  color: #286247;
  border-color: #b8dfc8;
}

.header .sync-status.error {
  background: #fff1ef;
  color: #9e352f;
  border-color: #efc4bf;
}

.controls select {
  min-width: 104px;
  padding: 0 30px 0 11px;
  background-color: #fff;
  color: #182335;
}

.controls > button {
  padding: 0 12px;
  background: #fff;
  color: #182335;
}

.controls > button:hover,
.filter-panel button:hover,
.zoom-controls button:hover {
  transform: none;
  border-color: #b9c8db;
  background: #f4f7fb;
  box-shadow: 0 4px 10px rgba(19, 31, 49, 0.06);
}

.controls > button:active,
.filter-panel button:active,
.zoom-controls button:active {
  transform: none;
}

.controls > #yonetimBtn {
  border-color: #245fc5;
  background: #2f66c9;
  color: #fff;
}

.controls > #yonetimBtn:hover {
  border-color: #1f56b5;
  background: #285fbd;
  color: #fff;
}

#toggleFiltersBtn.is-active {
  background: #eef4ff;
  color: #2357b2;
  border-color: #bcd0f1;
}

.notification-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.unread-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.zoom-controls {
  height: 34px;
  min-height: 34px;
  gap: 5px;
  padding: 3px 5px;
  border: 1px solid #d6dfeb;
  border-radius: 8px;
  background: #f3f6fa;
}

.zoom-controls button {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid #d6dfeb;
  background: #fff;
  color: #172033;
  font-size: 16px;
  font-weight: 850;
  box-shadow: none;
}

.zoom-controls span {
  min-width: 39px;
  font-size: 12.5px;
  font-weight: 800;
  color: #172033;
}

.filter-panel {
  display: grid;
  grid-template-columns: max-content 220px max-content minmax(260px, 420px) minmax(24px, 1fr) max-content max-content max-content;
  align-items: center;
  justify-content: start;
  gap: 8px;
  max-height: 64px;
  margin: 0;
  padding: 10px 18px;
  border: 0;
  border-bottom: 1px solid #dbe3ee;
  border-radius: 0;
  background: #f6f8fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
}

.filter-panel label {
  color: #526075;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.filter-panel input,
.filter-panel select,
.filter-panel button {
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #d6dfeb;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 0 11px;
  background: #fff;
  color: #172033;
}

.filter-panel input::placeholder {
  color: #8a95a6;
}

.filter-panel button {
  padding: 0 12px;
  background: #fff;
  color: #172033;
}

#clearBtn {
  display: none;
}

#reportBtn,
#jobCodeBtn {
  width: auto;
  min-width: 86px;
  padding: 0 13px;
  justify-self: start;
}

.filter-panel #notificationsBtn {
  grid-column: 8;
  justify-self: end;
  width: auto;
  min-width: 128px;
  padding: 0 13px;
}

.filter-panel.is-collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-color: transparent;
  pointer-events: none;
}

@media (max-width: 1260px) {
  .header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .brand {
    height: 36px;
    padding-right: 0;
    border-right: 0;
  }

  .controls {
    justify-content: flex-start;
  }

  .filter-panel {
    grid-template-columns: max-content minmax(145px, 220px) max-content minmax(220px, 420px) minmax(20px, 1fr) max-content max-content max-content;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .header {
    padding: 9px 12px;
  }

  .brand-logo {
    width: 200px;
  }

  .controls {
    justify-content: flex-start;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    max-height: 310px;
    padding: 10px 12px;
  }

  .filter-panel label {
    margin-top: 2px;
  }

  .filter-panel button {
    width: 100%;
  }

  .filter-panel.is-collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Management people/departments merge and compact add rows. */
#yonetimKisi .people-department-admin-group {
  margin-bottom: 12px;
  border: 0;
  background: transparent;
}

#yonetimKisi .people-department-title {
  grid-template-columns: auto minmax(220px, 1fr) auto auto !important;
  gap: 8px !important;
  margin: 0 0 8px !important;
  padding: 8px 10px !important;
  border: 1px solid #dce5f0 !important;
  border-radius: var(--ui-row-radius) !important;
  background: #fbfdff !important;
  cursor: default !important;
}

#yonetimKisi .people-department-title input[data-department-name-edit] {
  height: 35px;
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid var(--ui-control-border);
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 600;
}

#yonetimKisi .people-department-toggle {
  width: auto;
  min-width: 86px;
  height: 35px;
  min-height: 35px;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--ui-control-border);
  border-radius: 10px;
  background: #fff;
  color: var(--ui-muted);
  box-shadow: none;
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
}

#yonetimKisi .people-department-toggle::after {
  content: "+";
  color: var(--ui-text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

#yonetimKisi .people-department-admin-group.open .people-department-toggle::after {
  content: "-";
}

#yonetimKisi .people-department-toggle span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#yonetimKisi .people-department-admin-body {
  display: none;
  margin-top: 8px;
  padding: 10px 12px 12px;
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  background: #fff;
}

#yonetimKisi .people-department-admin-group.open .people-department-admin-body {
  display: block;
}

#yonetimKisi .people-dropzone,
#yonetimKisi .people-department-end-dropzone {
  min-height: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

#yonetimKisi .people-dropzone.drag-over,
#yonetimKisi .people-department-end-dropzone.drag-over {
  min-height: 14px;
  height: 14px;
  margin: 8px 0;
  border: 1px dashed #2563eb;
  border-radius: 10px;
}

#yonetimKisi .people-add-box {
  grid-template-columns: minmax(190px, 0.9fr) auto minmax(190px, 0.85fr) minmax(240px, 1fr) auto;
  align-items: center;
}

#yonetimYetki .add-new-box {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px) auto auto;
  align-items: center;
}

#yonetimIzin .add-new-box {
  grid-template-columns: minmax(145px, 1fr) minmax(118px, 0.55fr) minmax(118px, 0.55fr) minmax(145px, 0.9fr) minmax(145px, 1fr) auto;
  align-items: center;
}

#yonetimYetki .add-new-box button,
#yonetimIzin .add-new-box button,
#yonetimKisi .people-add-box button {
  align-self: center;
  white-space: nowrap;
}

@media (max-width: 900px) {
  #yonetimKisi .people-add-box,
  #yonetimYetki .add-new-box,
  #yonetimIzin .add-new-box {
    grid-template-columns: 1fr;
  }
}

/* Filter row zoom control. */
.sheet-zoom-control {
  width: 176px;
  height: 32px;
  min-height: 32px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  justify-self: end;
  padding: 5px 10px;
  border: 1px solid #d6dfeb;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.sheet-zoom-control #zoomLevel {
  min-width: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: right;
}

.sheet-zoom-control input[type="range"] {
  width: 100%;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  outline: none !important;
  appearance: none;
  -webkit-appearance: none;
  background: transparent !important;
  cursor: pointer;
}

.sheet-zoom-control input[type="range"]:focus,
.sheet-zoom-control input[type="range"]:focus-visible {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.sheet-zoom-control:focus-within {
  border-color: #b9c8db;
  box-shadow: 0 0 0 2px rgba(47, 102, 201, 0.10);
}

.sheet-zoom-control input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #2f66c9 0%,
    #2f66c9 var(--zoom-track, 50%),
    #d7e0ec var(--zoom-track, 50%),
    #d7e0ec 100%
  );
}

.sheet-zoom-control input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5.5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2f66c9;
  box-shadow: 0 2px 7px rgba(19, 31, 49, 0.28);
  appearance: none;
  -webkit-appearance: none;
}

.sheet-zoom-control input[type="range"]::-moz-range-track {
  height: 3px;
  border-radius: 999px;
  background: #d7e0ec;
}

.sheet-zoom-control input[type="range"]::-moz-range-progress {
  height: 3px;
  border-radius: 999px;
  background: #2f66c9;
}

.sheet-zoom-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2f66c9;
  box-shadow: 0 2px 7px rgba(19, 31, 49, 0.28);
}

@media (max-width: 760px) {
  .sheet-zoom-control {
    width: 100%;
    justify-self: stretch;
  }
}

/* Compact task chips: keep three jobs visible inside a standard day cell. */
.task-container {
  top: calc(1px * var(--zoom));
  left: calc(2px * var(--zoom));
  right: calc(2px * var(--zoom));
  bottom: calc(1px * var(--zoom));
  gap: calc(0.5px * var(--zoom));
}

.task-bar,
.more-tasks {
  min-height: calc(16px * var(--zoom));
  max-height: calc(18px * var(--zoom));
  border-radius: calc(5px * var(--zoom));
  padding: 0 calc(5px * var(--zoom));
  font-size: calc(11px * var(--zoom));
  line-height: 1;
}

.task-bar {
  flex: 0 0 auto;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.14);
}

.task-title {
  display: block;
  width: 100%;
  line-height: 1;
}

.task-phase,
.task-freelance {
  display: none;
}

.task-flag-icons {
  right: calc(3px * var(--zoom));
  top: 50%;
  transform: translateY(-50%);
  min-width: calc(14px * var(--zoom));
  padding: 0 calc(2px * var(--zoom));
  font-size: calc(7px * var(--zoom));
}

.task-blue-frame { border-width: 1px; }
.task-green-frame { border-width: 1px; }
.task-red-frame { border-width: 1px; }
.task-orange-frame { border-width: 1px; }
.task-purple-frame { border-width: 1px; }
.task-yellow-frame { border-width: 1px; }
.task-pink-frame { border-width: 1px; }
.task-teal-frame { border-width: 1px; }
.task-brown-frame { border-width: 1px; }
.task-black-frame { border-width: 1px; }
.task-indigo-frame { border-width: 1px; }
.task-lime-frame { border-width: 1px; }

/* Final top bar refinement: slimmer, quieter controls. */
.header {
  min-height: 52px;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 14px;
  padding: 7px 14px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(19, 31, 49, 0.04);
}

.brand {
  padding-right: 14px;
  border-right-color: #e8edf4;
}

.controls {
  gap: 5px;
}

.header .user-pill,
.header .sync-status,
.controls select,
.controls > button {
  height: 30px;
  min-height: 30px;
  border-radius: 7px;
  border-color: #dce4ef;
  background: #fff;
  font-size: 12px;
  font-weight: 760;
}

.header .user-pill,
.header .sync-status {
  padding: 0 10px;
}

.header .user-pill {
  max-width: 235px;
  color: #334155;
  background: #fbfcfe;
}

.header .sync-status {
  min-width: 58px;
  color: #23613f;
  background: #f2fbf6;
  border-color: #bfe3cf;
}

.header .sync-status.online {
  color: #23613f;
  background: #f2fbf6;
  border-color: #bfe3cf;
}

.controls select {
  min-width: 96px;
  padding: 0 28px 0 10px;
}

.controls > button {
  padding: 0 11px;
}

.controls > #toggleFiltersBtn {
  min-width: 112px;
}

.controls > #reportBtn {
  min-width: 74px;
}

.controls > #jobCodeBtn {
  min-width: 78px;
}

.controls > #yonetimBtn {
  min-width: 78px;
  border-color: #2f66c9;
}

.controls > #changePasswordBtn {
  min-width: 108px;
}

.controls > #logoutBtn {
  min-width: 60px;
}

.filter-panel {
  min-height: 44px;
  max-height: 52px;
  padding: 6px 14px;
  gap: 7px;
  background: #f8fafc;
}

.filter-panel label {
  font-size: 11.5px;
}

.filter-panel input,
.filter-panel select,
.filter-panel button {
  height: 30px;
  min-height: 30px;
  border-radius: 7px;
  border-color: #dce4ef;
  font-size: 12px;
}

.filter-panel #filterDept {
  max-width: 190px;
}

.filter-panel #searchInput {
  max-width: 420px;
}

.filter-panel #notificationsBtn {
  min-width: 118px;
}

.unread-badge {
  min-width: 18px;
  height: 18px;
  font-size: 10.5px;
}

.sheet-zoom-control {
  width: 166px;
  height: 30px;
  min-height: 30px;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 7px;
  padding: 5px 9px;
  border-color: #dce4ef;
}

.sheet-zoom-control #zoomLevel {
  font-size: 12px;
}

.settings-toggle {
  width: 32px;
  min-width: 32px !important;
  padding: 0 !important;
  display: inline-grid;
  place-items: center;
  font-size: 16px !important;
  line-height: 1;
}

.settings-toggle[aria-expanded="true"] {
  border-color: #b9c8db;
  background: #f4f7fb;
}

.settings-popover {
  position: fixed;
  z-index: 1250;
  width: 248px;
  padding: 10px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 46px rgba(19, 31, 49, 0.18);
  backdrop-filter: blur(14px);
}

.settings-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 9px;
  color: #172033;
  font-size: 13px;
  font-weight: 850;
}

.settings-action {
  width: 100%;
  height: 34px;
  min-height: 34px;
  margin-bottom: 10px;
  padding: 0 11px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  box-shadow: none;
  font-size: 12.5px;
  font-weight: 780;
  text-align: left;
}

.settings-action:hover {
  transform: none;
  border-color: #b9c8db;
  background: #f4f7fb;
  box-shadow: none;
}

.settings-section {
  padding: 10px;
  border: 1px solid #e6edf6;
  border-radius: 12px;
  background: #f8fafc;
}

.settings-section > span {
  display: block;
  margin-bottom: 8px;
  color: #526075;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.self-leave-person {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: #f8fafc;
}

.self-leave-person strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.self-leave-person span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.self-leave-manager-btn {
  width: 100%;
  min-height: 42px;
  margin: -6px 0 18px;
  border-color: #a9c2e8;
  background: #edf5ff;
  color: #174da9;
  font-weight: 850;
}

.self-leave-manager-btn:hover {
  border-color: #79a1dc;
  background: #e1edff;
}

.self-leave-existing {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

.self-leave-existing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.self-leave-existing-head strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.self-leave-existing-list {
  display: grid;
  gap: 8px;
}

.self-leave-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e1e9f3;
  border-radius: 13px;
  background: #fff;
}

.self-leave-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.self-leave-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.self-leave-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.self-leave-row button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.self-leave-empty {
  padding: 10px 12px;
  border: 1px dashed #d8e2ef;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.self-leave-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.self-leave-reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
}

.self-leave-reason-option {
  position: relative;
  min-height: 72px;
  display: grid;
  place-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1px solid #dbe5f1;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.self-leave-reason-option:hover {
  border-color: #b8c8db;
  transform: translateY(-1px);
}

.self-leave-reason-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.self-leave-reason-option span {
  font-size: 24px;
  line-height: 1;
}

.self-leave-reason-option strong {
  font-size: 12px;
  font-weight: 850;
}

.self-leave-reason-option:has(input:checked) {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(23, 105, 216, 0.12);
}

.self-leave-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 740;
}

.self-leave-message.error {
  color: #b42318;
}

@media (max-width: 560px) {
  .self-leave-row {
    grid-template-columns: 1fr;
  }

  .self-leave-row button {
    width: 100%;
  }

  .self-leave-date-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .self-leave-reason-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.theme-options label {
  min-width: 0;
  cursor: pointer;
}

.theme-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-options span {
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 760;
}

.theme-options input:checked + span {
  border-color: #2f66c9;
  background: #eef4ff;
  color: #1f56b5;
}

body.theme-dark {
  --ink: #e5eaf3;
  --muted: #9aa7ba;
  --line: #273348;
  --line-strong: #35445d;
  --surface: #0f1724;
  --surface-soft: #131d2c;
  --table-baby-blue: #142238;
  --table-baby-blue-strong: #1d314d;
  background: linear-gradient(180deg, #0b111d 0%, #111827 100%);
  color: #e5eaf3;
}

body.theme-dark .header,
body.theme-dark .filter-panel,
body.theme-dark .modal-content,
body.theme-dark .settings-popover,
body.theme-dark .cell-preview {
  background: rgba(15, 23, 36, 0.96);
  border-color: #273348;
  color: #e5eaf3;
}

body.theme-dark .brand {
  border-right-color: #273348;
}

body.theme-dark .brand-logo img {
  filter: invert(1) brightness(1.75);
  opacity: 0.96;
}

body.theme-dark .header .user-pill,
body.theme-dark .header .sync-status,
body.theme-dark .controls select,
body.theme-dark .controls > button,
body.theme-dark .filter-panel input,
body.theme-dark .filter-panel select,
body.theme-dark .filter-panel button,
body.theme-dark .sheet-zoom-control,
body.theme-dark .settings-action,
body.theme-dark .theme-options span {
  border-color: #334158;
  background: #131d2c;
  color: #e5eaf3;
}

body.theme-dark .header .sync-status,
body.theme-dark .header .sync-status.online {
  background: #10281d;
  color: #8fe3b0;
  border-color: #265c3e;
}

body.theme-dark .self-leave-person,
body.theme-dark .self-leave-row,
body.theme-dark .self-leave-empty,
body.theme-dark .self-leave-reason-option {
  border-color: #334158;
  background: #131d2c;
  color: #e5eaf3;
}

body.theme-dark .self-leave-person strong,
body.theme-dark .self-leave-row strong,
body.theme-dark .self-leave-reason-option strong {
  color: #e5eaf3;
}

body.theme-dark .self-leave-person span,
body.theme-dark .self-leave-row span,
body.theme-dark .self-leave-empty {
  color: #97a6bc;
}

body.theme-dark .self-leave-reason-option:has(input:checked) {
  border-color: #7aa7ff;
  box-shadow: 0 0 0 4px rgba(122, 167, 255, 0.18);
}

body.theme-dark .self-leave-manager-btn {
  border-color: #44648d;
  background: #1c3150;
  color: #a9c9ff;
}

body.theme-dark .controls > #yonetimBtn {
  background: #336fd8;
  border-color: #3f7eea;
  color: #fff;
}

body.theme-dark .filter-panel,
body.theme-dark th,
body.theme-dark .name-col {
  background: #142238;
  color: #e5eaf3;
}

body.theme-dark td {
  background: #0f1724;
  border-color: #273348;
}

body.theme-dark .day-cell:hover {
  background: #17263c;
}

body.theme-dark th.holiday {
  background: #142238;
  color: #f3a5a5;
}

body.theme-dark th.today-col {
  background: #183252;
  color: #d9e7ff;
  box-shadow: inset 0 0 0 2px #3f7eea;
}

body.theme-dark .day-cell.holiday {
  background: #161c2b;
}

body.theme-dark .day-cell.holiday:hover {
  background: #1b2335;
}

body.theme-dark .day-cell.today-col,
body.theme-dark .day-cell.holiday.today-col {
  background: #172b42;
  box-shadow: inset 2px 0 0 #3f7eea, inset -2px 0 0 #3f7eea, inset 0 -1px 0 rgba(63, 126, 234, 0.45);
}

body.theme-dark .day-cell.today-col:hover,
body.theme-dark .day-cell.holiday.today-col:hover {
  background: #1b3552;
}

body.theme-dark .day-cell.leave-cell {
  background: #0f1724;
}

body.theme-dark .day-cell.leave-cell:hover {
  background: #0f1724;
}

body.theme-dark .day-cell.holiday.leave-cell,
body.theme-dark .day-cell.holiday.leave-cell:hover {
  background: #2b1f2a;
}

body.theme-dark .day-cell.today-col.leave-cell,
body.theme-dark .day-cell.today-col.leave-cell:hover,
body.theme-dark .day-cell.holiday.today-col.leave-cell,
body.theme-dark .day-cell.holiday.today-col.leave-cell:hover {
  background: #172b42;
}

body.theme-dark .task-red-frame,
body.theme-dark .task-pink-frame,
body.theme-dark .task-yellow-frame {
  background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .settings-section {
  border-color: #273348;
  background: #101928;
}

body.theme-dark .settings-popover-head,
body.theme-dark .settings-section > span,
body.theme-dark .filter-panel label {
  color: #aeb9ca;
}

body.theme-dark .theme-options input:checked + span {
  border-color: #6d9cff;
  background: #17335f;
  color: #d9e7ff;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  color-scheme: dark;
}

/* Resizable management dialogs: keep add forms tidy at every modal width. */
.add-new-box,
#yonetimKisi .people-add-box,
#yonetimYetki .add-new-box,
#yonetimIzin .add-new-box,
#yonetimTatil .add-new-box,
#yonetimEkipman .equipment-add-box {
  overflow: hidden;
}

.add-new-box > *,
#yonetimKisi .people-add-box > *,
#yonetimYetki .add-new-box > *,
#yonetimIzin .add-new-box > *,
#yonetimTatil .add-new-box > *,
#yonetimEkipman .equipment-add-box > * {
  min-width: 0;
}

#yonetimKisi .people-add-box,
#yonetimYetki .add-new-box,
#yonetimIzin .add-new-box,
#yonetimTatil .add-new-box,
#yonetimEkipman .equipment-add-box {
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  align-items: center;
}

#yonetimKisi .people-add-box button,
#yonetimYetki .add-new-box button,
#yonetimIzin .add-new-box button,
#yonetimTatil .add-new-box button,
#yonetimEkipman .equipment-add-box button {
  justify-self: start;
  align-self: center;
  width: auto;
  max-width: 100%;
  min-width: 94px;
  white-space: nowrap;
}

#yonetimKisi .people-add-box input,
#yonetimKisi .people-add-box select,
#yonetimYetki .add-new-box input,
#yonetimYetki .add-new-box select,
#yonetimIzin .add-new-box input,
#yonetimIzin .add-new-box select,
#yonetimTatil .add-new-box input,
#yonetimTatil .add-new-box select,
#yonetimEkipman .equipment-add-box input,
#yonetimEkipman .equipment-add-box select {
  width: 100%;
}

/* Dark theme modal polish. */
body.theme-dark .modal {
  background: rgba(4, 9, 18, 0.74);
}

body.theme-dark .modal-content,
body.theme-dark .auth-modal-content,
body.theme-dark .task-modal-content,
body.theme-dark .report-modal-content,
body.theme-dark .job-code-modal-content,
body.theme-dark .yonetim-modal-content {
  background: #101827 !important;
  border-color: #2b3a52 !important;
  color: #e5eaf3 !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5) !important;
}

body.theme-dark .task-modal-content > .btn-row,
body.theme-dark .yonetim-modal-content > .btn-row,
body.theme-dark .btn-row {
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.78), #101827 58%) !important;
  border-top-color: #2b3a52 !important;
}

body.theme-dark .modal-heading p,
body.theme-dark .form-row label,
body.theme-dark .helper-copy,
body.theme-dark .auth-copy,
body.theme-dark .auth-help,
body.theme-dark .equipment-total,
body.theme-dark .equipment-total-grand span {
  color: #aeb9ca !important;
}

body.theme-dark .add-new-box,
body.theme-dark .item-row,
body.theme-dark .row-simple,
body.theme-dark .row-user,
body.theme-dark .row-holiday,
body.theme-dark .row-leave,
body.theme-dark .row-equipment,
body.theme-dark .backup-panel,
body.theme-dark .small-empty,
body.theme-dark .day-plan-card,
body.theme-dark .checkbox-row,
body.theme-dark .mini-check,
body.theme-dark .billing-section,
body.theme-dark .equipment-section,
body.theme-dark .equipment-master-title,
body.theme-dark .equipment-master-body,
body.theme-dark .equipment-group-title,
body.theme-dark .equipment-group-body,
body.theme-dark .equipment-row,
body.theme-dark #yonetimKisi .people-department-title,
body.theme-dark #yonetimKisi .people-department-admin-body,
body.theme-dark #yonetimEkipman .equipment-category-title,
body.theme-dark #yonetimEkipman .equipment-category-admin-body {
  background: #131d2c !important;
  border-color: #2b3a52 !important;
  color: #e5eaf3 !important;
}

body.theme-dark .equipment-mobile-stepper {
  background: #243249 !important;
  border-color: #52657f !important;
}

body.theme-dark .equipment-mobile-stepper button {
  background: #1f2b3c !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark .equipment-mobile-stepper strong {
  color: #edf3fb !important;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .add-new-box input,
body.theme-dark .add-new-box select,
body.theme-dark .item-row input,
body.theme-dark .item-row select,
body.theme-dark .form-row input,
body.theme-dark .form-row select,
body.theme-dark .form-row textarea,
body.theme-dark .task-modal-content input,
body.theme-dark .task-modal-content select,
body.theme-dark .task-modal-content textarea,
body.theme-dark .yonetim-modal-content input,
body.theme-dark .yonetim-modal-content select,
body.theme-dark .yonetim-modal-content textarea,
body.theme-dark .auth-modal-content input {
  background: #0f1724 !important;
  border-color: #334158 !important;
  color: #e5eaf3 !important;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #748195 !important;
}

body.theme-dark .btn-cancel,
body.theme-dark .secondary-btn,
body.theme-dark .mini-calendar-head button,
body.theme-dark .mini-calendar-actions button {
  background: #131d2c !important;
  border-color: #334158 !important;
  color: #e5eaf3 !important;
}

body.theme-dark .btn-save,
body.theme-dark .yonetim-save-all {
  background: #2f66c9 !important;
  color: #fff !important;
}

body.theme-dark .btn-delete,
body.theme-dark .btn-del-small,
body.theme-dark #deleteBtn {
  background: #dc2626 !important;
  color: #fff !important;
}

body.theme-dark .equipment-total-grand {
  border-top-color: #334158 !important;
}

body.theme-dark .equipment-total-grand b,
body.theme-dark .modal-content h3,
body.theme-dark .task-modal-content > h3 {
  color: #eaf0f8 !important;
}

body.theme-dark .modal-resize-handle::before,
body.theme-dark .modal-resize-handle::after {
  background: #64748b;
}

/* Final responsive and dark-mode refinements. */
.filter-panel.is-collapsed {
  display: none !important;
  min-height: 0 !important;
  max-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

#yonetimKisi .people-add-box {
  grid-template-columns:
    minmax(92px, 1fr)
    minmax(104px, max-content)
    minmax(118px, 0.86fr)
    minmax(92px, 1fr)
    minmax(82px, max-content);
  gap: clamp(5px, 0.75vw, 10px);
}

#yonetimKisi .people-add-box input,
#yonetimKisi .people-add-box select {
  height: clamp(34px, 4.2vw, 48px);
  min-height: 34px;
  padding-inline: clamp(8px, 1.2vw, 14px);
  font-size: clamp(11px, 1.55vw, 16px);
}

#yonetimKisi .people-add-box button {
  height: clamp(34px, 4.2vw, 48px);
  min-height: 34px;
  min-width: 0;
  padding-inline: clamp(9px, 1.45vw, 18px);
  border-radius: clamp(9px, 1.2vw, 13px);
  font-size: clamp(11px, 1.52vw, 16px);
}

body.theme-dark {
  --ink: #edf3fb;
  --muted: #b6c1d1;
  --line: #3a4960;
  --line-strong: #4b5d78;
  --surface: #1b2636;
  --surface-soft: #202d3f;
  --table-baby-blue: #223246;
  --table-baby-blue-strong: #2b4059;
  background: linear-gradient(180deg, #182232 0%, #202b3a 100%);
  color: #edf3fb;
}

body.theme-dark .header,
body.theme-dark .filter-panel,
body.theme-dark .modal-content,
body.theme-dark .auth-modal-content,
body.theme-dark .task-modal-content,
body.theme-dark .report-modal-content,
body.theme-dark .job-code-modal-content,
body.theme-dark .yonetim-modal-content,
body.theme-dark .settings-popover,
body.theme-dark .cell-preview {
  background: rgba(31, 43, 60, 0.97) !important;
  border-color: #3a4960 !important;
  color: #edf3fb !important;
}

body.theme-dark .modal {
  background: rgba(16, 24, 36, 0.58);
}

body.theme-dark .header .user-pill,
body.theme-dark .controls select,
body.theme-dark .controls > button,
body.theme-dark .filter-panel input,
body.theme-dark .filter-panel select,
body.theme-dark .filter-panel button,
body.theme-dark .sheet-zoom-control,
body.theme-dark .settings-action,
body.theme-dark .theme-options span,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .add-new-box input,
body.theme-dark .add-new-box select,
body.theme-dark .item-row input,
body.theme-dark .item-row select,
body.theme-dark .form-row input,
body.theme-dark .form-row select,
body.theme-dark .form-row textarea,
body.theme-dark .task-modal-content input,
body.theme-dark .task-modal-content select,
body.theme-dark .task-modal-content textarea,
body.theme-dark .yonetim-modal-content input,
body.theme-dark .yonetim-modal-content select,
body.theme-dark .yonetim-modal-content textarea,
body.theme-dark .auth-modal-content input {
  background: #243249 !important;
  border-color: #4a5b75 !important;
  color: #edf3fb !important;
}

body.theme-dark .header .sync-status,
body.theme-dark .header .sync-status.online {
  background: #173b2c !important;
  color: #a9efc4 !important;
  border-color: #3b8057 !important;
}

body.theme-dark .add-new-box,
body.theme-dark .item-row,
body.theme-dark .row-simple,
body.theme-dark .row-user,
body.theme-dark .row-holiday,
body.theme-dark .row-leave,
body.theme-dark .row-equipment,
body.theme-dark .backup-panel,
body.theme-dark .small-empty,
body.theme-dark .day-plan-card,
body.theme-dark .checkbox-row,
body.theme-dark .mini-check,
body.theme-dark .billing-section,
body.theme-dark .equipment-section,
body.theme-dark .equipment-master-title,
body.theme-dark .equipment-master-body,
body.theme-dark .equipment-group-title,
body.theme-dark .equipment-group-body,
body.theme-dark .equipment-row,
body.theme-dark #yonetimKisi .people-department-title,
body.theme-dark #yonetimKisi .people-department-admin-body,
body.theme-dark #yonetimEkipman .equipment-category-title,
body.theme-dark #yonetimEkipman .equipment-category-admin-body {
  background: #202d3f !important;
  border-color: #3f5069 !important;
  color: #edf3fb !important;
}

body.theme-dark th,
body.theme-dark .name-col {
  background: #24364b !important;
  color: #edf3fb !important;
}

body.theme-dark .dept-label {
  background: linear-gradient(180deg, #4d6178 0%, #394b62 100%) !important;
  color: #f5f8fc !important;
  border-bottom-color: #52657f !important;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.12) !important;
}

body.theme-dark td {
  background: #1d2a3b !important;
  border-color: #3a4960 !important;
}

body.theme-dark .day-cell:hover {
  background: #26384e !important;
}

body.theme-dark th.holiday {
  background: #27374a !important;
  color: #ffb0b0 !important;
}

body.theme-dark .day-cell.holiday {
  background: #2a3141 !important;
}

body.theme-dark .day-cell.today-col,
body.theme-dark .day-cell.holiday.today-col {
  background: #2b4059 !important;
  box-shadow: inset 2px 0 0 #5b8def, inset -2px 0 0 #5b8def, inset 0 -1px 0 rgba(91, 141, 239, 0.5) !important;
}

body.theme-dark .task-modal-content > .btn-row,
body.theme-dark .yonetim-modal-content > .btn-row,
body.theme-dark .btn-row {
  background: linear-gradient(180deg, rgba(31, 43, 60, 0.78), #1f2b3c 58%) !important;
  border-top-color: #3a4960 !important;
}

body.theme-dark #toggleFiltersBtn.is-active,
body.theme-dark .settings-action.is-active {
  background: #263b59 !important;
  border-color: #5b78a3 !important;
  color: #eaf2ff !important;
}

body.theme-dark .theme-options input:checked + span {
  border-color: #7da6ff !important;
  background: #2b4b7b !important;
  color: #f2f7ff !important;
}

/* Compact one-line people add form; no wrapping, no overlap. */
#yonetimKisi .people-add-box {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

#yonetimKisi .people-add-box input,
#yonetimKisi .people-add-box select {
  flex: 1 1 0;
  min-width: 78px !important;
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: clamp(11px, 1.15vw, 14px);
}

#yonetimKisi .people-add-box #newPersonDepartment {
  flex: 0.9 1 0;
  min-width: 118px !important;
}

#yonetimKisi .people-add-box button {
  flex: 0 0 auto;
  height: 38px;
  min-height: 38px;
  min-width: 62px;
  max-width: none;
  padding: 0 12px;
  border-radius: 10px;
  font-size: clamp(11px, 1.05vw, 13px);
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
}

#yonetimKisi .people-add-box #addDeptBtn {
  min-width: 104px;
}

#yonetimKisi .people-add-box #addPersonBtn {
  min-width: 70px;
}

/* Management add row polish: smaller, aligned, and less bulky. */
#yonetimKisi .people-add-box {
  gap: 6px !important;
  padding: 8px !important;
}

#yonetimKisi .people-add-box input,
#yonetimKisi .people-add-box select,
#yonetimKisi .people-add-box button {
  height: 32px !important;
  min-height: 32px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  box-sizing: border-box;
}

#yonetimKisi .people-add-box input {
  min-width: 70px !important;
  padding: 0 8px !important;
}

#yonetimKisi .people-add-box select {
  min-width: 108px !important;
  padding: 0 26px 0 8px !important;
  appearance: auto;
}

#yonetimKisi .people-add-box button {
  padding: 0 10px !important;
  min-width: 56px !important;
  font-weight: 800 !important;
}

#yonetimKisi .people-add-box #addDeptBtn {
  min-width: 90px !important;
}

#yonetimKisi .people-add-box #addPersonBtn {
  min-width: 58px !important;
}

#yonetimEkipman .equipment-category-toggle {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
  height: 34px !important;
  min-height: 34px !important;
  justify-self: end;
  padding: 0 10px !important;
}

#yonetimEkipman .equipment-category-toggle span {
  width: 78px;
  text-align: left;
}

/* Management panel system: one compact visual language across every tab. */
.yonetim-modal-content {
  --admin-row-h: 46px;
  --admin-control-h: 32px;
  --admin-radius: 10px;
  --admin-gap: 7px;
}

.yonetim-modal-content .yonetim-content.active {
  gap: 8px;
}

.yonetim-modal-content .item-row,
.yonetim-modal-content .add-new-box,
#yonetimKisi .people-department-title,
#yonetimEkipman .equipment-category-title {
  min-height: var(--admin-row-h) !important;
  margin: 0 0 7px !important;
  padding: 6px 8px !important;
  border: 1px solid #d9e3ef !important;
  border-radius: 12px !important;
  background: #f9fbfe !important;
  box-shadow: none !important;
}

.yonetim-modal-content input,
.yonetim-modal-content select,
.yonetim-modal-content textarea,
.yonetim-modal-content button,
.yonetim-modal-content .mini-check {
  box-sizing: border-box;
}

.yonetim-modal-content .item-row input,
.yonetim-modal-content .item-row select,
.yonetim-modal-content .add-new-box input,
.yonetim-modal-content .add-new-box select,
#yonetimKisi .people-department-title input[data-department-name-edit],
#yonetimEkipman .equipment-category-title input[data-equipment-category-name-edit] {
  height: var(--admin-control-h) !important;
  min-height: var(--admin-control-h) !important;
  padding: 0 9px !important;
  border-radius: var(--admin-radius) !important;
  border: 1px solid #cbd8e8 !important;
  background: #fff !important;
  color: #162033 !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.yonetim-modal-content .item-row button,
.yonetim-modal-content .add-new-box button,
#yonetimKisi .people-department-toggle,
#yonetimEkipman .equipment-category-toggle {
  height: var(--admin-control-h) !important;
  min-height: var(--admin-control-h) !important;
  padding: 0 10px !important;
  border-radius: var(--admin-radius) !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.yonetim-modal-content .drag-handle {
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  background: #fff !important;
  color: #53647d !important;
  border: 1px solid #cbd8e8 !important;
}

.yonetim-modal-content .btn-del-small {
  width: 56px !important;
  min-width: 56px !important;
  padding: 0 !important;
}

.yonetim-modal-content .add-new-box {
  display: grid !important;
  align-items: center !important;
  gap: var(--admin-gap) !important;
  background: #f5f8fc !important;
}

#yonetimKisi .people-add-box {
  display: grid !important;
  grid-template-columns:
    minmax(96px, 1fr)
    64px
    minmax(130px, 0.9fr)
    minmax(96px, 1fr)
    64px !important;
  gap: var(--admin-gap) !important;
  overflow: hidden !important;
}

#yonetimKisi .people-add-box input,
#yonetimKisi .people-add-box select,
#yonetimKisi .people-add-box button {
  width: 100% !important;
  min-width: 0 !important;
}

#yonetimKisi .people-add-box button,
#yonetimKisi .people-add-box #addDeptBtn,
#yonetimKisi .people-add-box #addPersonBtn {
  min-width: 0 !important;
  padding-inline: 7px !important;
  justify-self: stretch !important;
}

#yonetimYetki .add-new-box {
  grid-template-columns: minmax(180px, 1fr) minmax(116px, 150px) minmax(110px, auto) 74px !important;
}

#yonetimIzin .add-new-box {
  grid-template-columns: minmax(145px, 1fr) minmax(112px, 0.62fr) minmax(112px, 0.62fr) minmax(132px, 0.86fr) minmax(132px, 1fr) 74px !important;
}

#yonetimTatil .add-new-box {
  grid-template-columns: minmax(130px, 170px) minmax(180px, 1fr) 74px !important;
}

#yonetimEkipman .equipment-add-box {
  grid-template-columns: minmax(118px, 0.62fr) minmax(180px, 1fr) minmax(88px, 0.36fr) 96px !important;
}

#yonetimEkipman .equipment-category-title {
  grid-template-columns: 32px minmax(0, 1fr) 118px !important;
  gap: var(--admin-gap) !important;
}

#yonetimEkipman .equipment-category-toggle,
#yonetimKisi .people-department-toggle {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
  display: inline-grid !important;
  grid-template-columns: minmax(0, 1fr) 14px !important;
  align-items: center !important;
  justify-self: end !important;
  background: #fff !important;
  border: 1px solid #cbd8e8 !important;
  color: #53647d !important;
}

#yonetimEkipman .equipment-category-toggle span,
#yonetimKisi .people-department-toggle span {
  width: auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-align: left !important;
  text-overflow: ellipsis !important;
}

body.theme-dark .yonetim-modal-content .item-row,
body.theme-dark .yonetim-modal-content .add-new-box,
body.theme-dark #yonetimKisi .people-department-title,
body.theme-dark #yonetimEkipman .equipment-category-title {
  background: #223148 !important;
  border-color: #455873 !important;
}

body.theme-dark .yonetim-modal-content .item-row input,
body.theme-dark .yonetim-modal-content .item-row select,
body.theme-dark .yonetim-modal-content .add-new-box input,
body.theme-dark .yonetim-modal-content .add-new-box select,
body.theme-dark #yonetimKisi .people-department-title input[data-department-name-edit],
body.theme-dark #yonetimEkipman .equipment-category-title input[data-equipment-category-name-edit],
body.theme-dark #yonetimEkipman .equipment-category-toggle,
body.theme-dark #yonetimKisi .people-department-toggle,
body.theme-dark .yonetim-modal-content .drag-handle {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

/* Management add controls: equal columns and no clipped action labels. */
.yonetim-modal-content {
  --admin-control-h: 34px;
  --admin-add-btn-w: 72px;
}

.yonetim-modal-content .add-new-box {
  overflow: hidden !important;
}

.yonetim-modal-content .add-new-box input,
.yonetim-modal-content .add-new-box select,
.yonetim-modal-content .add-new-box button,
.yonetim-modal-content .add-new-box .mini-check {
  height: var(--admin-control-h) !important;
  min-height: var(--admin-control-h) !important;
  align-self: center !important;
}

.yonetim-modal-content .add-new-box button.btn-add-small {
  width: var(--admin-add-btn-w) !important;
  min-width: var(--admin-add-btn-w) !important;
  max-width: var(--admin-add-btn-w) !important;
  padding: 0 !important;
  justify-self: stretch !important;
  overflow: visible !important;
  text-align: center !important;
}

.yonetim-modal-content .add-new-box .mini-check {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  min-width: 128px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd8e8 !important;
  background: #fff !important;
  color: #162033 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
}

.yonetim-modal-content .add-new-box .mini-check input {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0 !important;
}

#yonetimYetki .mini-check {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 150px !important;
}

#yonetimYetki .mini-check input[type="checkbox"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  border: 2px solid #8ea0b8 !important;
  border-radius: 5px !important;
  background: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none !important;
}

#yonetimYetki .mini-check input[type="checkbox"]::after {
  content: "" !important;
  width: 5px !important;
  height: 9px !important;
  border-right: 2px solid #fff !important;
  border-bottom: 2px solid #fff !important;
  transform: rotate(45deg) scale(0) !important;
  transform-origin: center !important;
}

#yonetimYetki .mini-check input[type="checkbox"]:checked {
  border-color: #2f6bd5 !important;
  background: #2f6bd5 !important;
}

#yonetimYetki .mini-check input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1) !important;
}

body.theme-dark #yonetimYetki .mini-check input[type="checkbox"] {
  border-color: #7f91aa !important;
  background: #1f2b3c !important;
}

body.theme-dark #yonetimYetki .mini-check input[type="checkbox"]:checked {
  border-color: #6fa1ff !important;
  background: #3b82f6 !important;
}

#authModal {
  padding: 16px !important;
  align-items: center !important;
  justify-content: center !important;
}

#authModal .auth-modal-content {
  width: min(340px, calc(100vw - 32px)) !important;
  max-width: min(340px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  padding: 20px !important;
  border: 1px solid rgba(203, 216, 232, 0.95) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24) !important;
  overflow: visible !important;
  resize: none !important;
}

#authModal .modal-resize-handle {
  display: none !important;
}

#authModal .auth-modal-content h3 {
  margin: 0 0 16px !important;
  color: #111827 !important;
  font-size: 24px !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

#authModal .auth-copy,
#authModal .auth-help {
  display: none !important;
}

#authModal .form-row {
  margin-bottom: 11px !important;
}

#authModal .form-row label {
  display: block !important;
  margin: 0 0 5px !important;
  color: #55627a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#authModal .form-row input {
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 12px !important;
  border: 1px solid #cbd8e8 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}

#authModal .form-row input:focus {
  border-color: #2f6bd5 !important;
  box-shadow: 0 0 0 3px rgba(47, 107, 213, 0.14) !important;
  outline: none !important;
}

#authModal .auth-message {
  min-height: 18px !important;
  margin: 2px 0 11px !important;
  color: #b42318 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
}

#authModal .auth-message:not(.error):not(.success):empty {
  display: none !important;
}

#authModal .auth-message.success {
  color: #15713a !important;
}

#authModal .btn-row {
  position: static !important;
  display: block !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#authModal #authSubmitBtn {
  width: 100% !important;
  min-height: 40px !important;
  padding: 0 16px !important;
  border-radius: 11px !important;
  background: #245fcb !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  box-shadow: 0 10px 24px rgba(36, 95, 203, 0.22) !important;
}

#authModal .passkey-login-btn {
  width: 100% !important;
  min-height: 38px !important;
  margin: 9px 0 0 !important;
  padding: 0 14px !important;
  border: 1px solid #bfd0e6 !important;
  border-radius: 11px !important;
  background: #ffffff !important;
  color: #172033 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

#authModal .passkey-login-btn:hover {
  border-color: #7fa5dd !important;
  background: #eef5ff !important;
}

#authModal .auth-links {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 7px !important;
  margin-top: 10px !important;
}

#authModal .link-btn {
  width: 100% !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border-radius: 9px !important;
  background: #f3f6fb !important;
  color: #245fcb !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

#authModal .link-btn:hover {
  background: #eaf1ff !important;
  color: #174da9 !important;
  text-decoration: none !important;
}

#authModal .link-btn:disabled,
#authModal .link-btn:disabled:hover {
  cursor: not-allowed !important;
  border-color: #cbd8e6 !important;
  background: #eef2f7 !important;
  color: #758396 !important;
  box-shadow: none !important;
  transform: none !important;
}

#authModal .auth-daily-quote {
  width: min(520px, calc(100vw - 48px)) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: #e8eef8 !important;
  text-align: center !important;
  opacity: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

#authModal .auth-daily-quote.is-visible {
  animation: auth-quote-fade-in 280ms ease-out forwards;
}

#authModal .auth-daily-quote blockquote {
  margin: 0 !important;
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.5 !important;
  text-wrap: pretty;
}

#authModal .auth-daily-quote figcaption {
  margin-top: 7px !important;
  color: #b6c2d3 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

@keyframes auth-quote-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #authModal .auth-daily-quote.is-visible {
    animation: none !important;
    opacity: 1 !important;
  }
}

body.theme-dark #authModal .auth-modal-content {
  background: linear-gradient(180deg, #18253a 0%, #131e2f 100%) !important;
  border-color: #34445f !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48) !important;
}

body.theme-dark #authModal .auth-modal-content h3 {
  color: #edf3fb !important;
}

body.theme-dark #authModal .form-row label {
  color: #aeb9ca !important;
}

body.theme-dark #authModal .form-row input {
  background: #0f1724 !important;
  border-color: #3b4d68 !important;
  color: #edf3fb !important;
}

body.theme-dark #authModal .passkey-login-btn {
  background: #16243a !important;
  border-color: #3b4d68 !important;
  color: #edf3fb !important;
}

body.theme-dark #authModal .passkey-login-btn:hover {
  background: #20314e !important;
}

body.theme-dark #authModal .link-btn {
  background: #1b2940 !important;
  color: #8db7ff !important;
}

body.theme-dark #authModal .link-btn:hover {
  background: #243653 !important;
}

body.theme-dark #authModal .link-btn:disabled,
body.theme-dark #authModal .link-btn:disabled:hover {
  background: #182235 !important;
  color: #6f8099 !important;
  border-color: #31415a !important;
}

body.theme-dark #authModal .auth-daily-quote {
  color: #d9e3f0 !important;
}

body.theme-dark #authModal .auth-daily-quote figcaption {
  color: #aeb9ca !important;
}

#authModal .auth-login-logo,
#authModal .auth-daily-quote {
  display: none !important;
}

@media (min-width: 721px) {
  #authModal {
    flex-direction: column !important;
    gap: 44px !important;
  }

  #authModal .auth-login-logo {
    position: relative;
    z-index: 2002;
    display: block !important;
    width: min(624px, calc(100vw - 64px)) !important;
    height: auto !important;
    filter: invert(1);
    transform: translateY(-52px);
  }

  #authModal .auth-daily-quote.is-visible {
    position: fixed;
    right: clamp(24px, 4vw, 72px);
    bottom: clamp(24px, 4vh, 60px);
    z-index: 2002;
    display: block !important;
    width: min(560px, calc(100vw - 48px)) !important;
    max-height: min(220px, 32vh);
    overflow: auto;
    pointer-events: none;
  }

  #authModal .auth-daily-quote blockquote {
    font-family: Georgia, "Times New Roman", serif !important;
    font-size: 18px !important;
    font-style: italic !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.005em !important;
    text-align: left !important;
  }

  #authModal .auth-daily-quote figcaption {
    margin-top: 11px !important;
    padding-right: 10px !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    letter-spacing: 0.02em !important;
    text-align: right !important;
  }

  body.auth-modal-open #authLogoSilhouette,
  body.hide-schedule-until-auth #authLogoSilhouette {
    display: none !important;
  }
}

@media (min-width: 721px) and (max-height: 760px) {
  #authModal .auth-daily-quote.is-visible {
    right: 24px;
    bottom: 18px;
    width: min(460px, calc(100vw - 48px)) !important;
  }

  #authModal .auth-daily-quote blockquote {
    font-size: 16px !important;
  }
}

#yonetimKisi .people-add-box {
  grid-template-columns:
    minmax(120px, 1fr)
    var(--admin-add-btn-w)
    minmax(150px, 0.86fr)
    minmax(120px, 1fr)
    var(--admin-add-btn-w) !important;
}

#yonetimKisi .people-add-box input,
#yonetimKisi .people-add-box select,
#yonetimKisi .people-add-box button {
  height: var(--admin-control-h) !important;
  min-height: var(--admin-control-h) !important;
}

#yonetimKisi .people-add-box #addDeptBtn,
#yonetimKisi .people-add-box #addPersonBtn {
  width: var(--admin-add-btn-w) !important;
  min-width: var(--admin-add-btn-w) !important;
  max-width: var(--admin-add-btn-w) !important;
}

#yonetimYetki .add-new-box {
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 170px) minmax(128px, auto) var(--admin-add-btn-w) !important;
}

#yonetimIzin .add-new-box {
  grid-template-columns: minmax(150px, 1fr) minmax(118px, 0.62fr) minmax(118px, 0.62fr) minmax(132px, 0.86fr) minmax(132px, 1fr) var(--admin-add-btn-w) !important;
}

#yonetimTatil .add-new-box {
  grid-template-columns: minmax(140px, 180px) minmax(220px, 1fr) var(--admin-add-btn-w) !important;
}

#yonetimEkipman .equipment-add-box {
  grid-template-columns: minmax(120px, 0.62fr) minmax(200px, 1fr) minmax(94px, 0.36fr) var(--admin-add-btn-w) !important;
}

body.theme-dark .yonetim-modal-content .add-new-box .mini-check {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

/* Final vertical alignment fix for every management add button. */
.yonetim-modal-content .add-new-box {
  align-items: center !important;
  grid-auto-rows: var(--admin-control-h) !important;
}

.yonetim-modal-content .add-new-box > input,
.yonetim-modal-content .add-new-box > select,
.yonetim-modal-content .add-new-box > button,
.yonetim-modal-content .add-new-box > label {
  margin: 0 !important;
  align-self: center !important;
  transform: none !important;
}

.yonetim-modal-content .add-new-box > button.btn-add-small {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  place-self: center stretch !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}

#yonetimKisi .people-add-box > input,
#yonetimKisi .people-add-box > select,
#yonetimKisi .people-add-box > button {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
}

/* People management rows: keep name, email and actions on one line. */
#yonetimKisi .people-department-title {
  grid-template-columns: 32px minmax(0, 1fr) minmax(82px, 118px) 50px !important;
  gap: 7px !important;
  align-items: center !important;
}

#yonetimKisi .admin-sort-row[data-sort-type="person"] {
  grid-template-columns: 32px minmax(150px, 1.35fr) minmax(120px, 0.48fr) 50px !important;
  gap: 7px !important;
  align-items: center !important;
}

#yonetimKisi .admin-sort-row[data-sort-type="person"] input,
#yonetimKisi .admin-sort-row[data-sort-type="person"] .person-email-input {
  min-width: 0 !important;
  width: 100% !important;
}

#yonetimKisi .people-department-title .btn-del-small,
#yonetimKisi .admin-sort-row[data-sort-type="person"] .btn-del-small {
  width: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  font-size: 11.5px !important;
}

#yonetimKisi .people-add-box {
  grid-template-columns:
    minmax(128px, 0.9fr)
    72px
    minmax(150px, 0.84fr)
    minmax(140px, 0.9fr)
    minmax(128px, 0.72fr)
    72px !important;
  gap: 7px !important;
  overflow: hidden !important;
}

#yonetimKisi .people-add-box #newPersonEmail {
  min-width: 0 !important;
}

#yonetimKisi .people-add-box #addDeptBtn,
#yonetimKisi .people-add-box #addPersonBtn {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  padding-inline: 0 !important;
  font-size: 11.5px !important;
  white-space: nowrap !important;
}

/* Task day copy/paste controls. */
#taskModal .task-modal-content .day-plan-card.single {
  grid-template-columns: minmax(0, 1fr) minmax(224px, 0.48fr) !important;
}

#taskModal .task-modal-content .day-plan-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin: 0 !important;
  align-self: stretch !important;
}

#taskModal .task-modal-content .day-plan-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 5px !important;
  border-radius: 10px !important;
  font-size: 10.5px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}

#taskModal .task-modal-content .copy-active-day-btn,
#taskModal .task-modal-content .paste-active-day-btn {
  color: #1e5fbc !important;
  border: 1px solid #c7d8f2 !important;
  background: #eef6ff !important;
}

#taskModal .task-modal-content .paste-active-day-btn:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

#taskModal .task-modal-content .day-plan-actions .remove-active-days-btn {
  color: #9f2d20 !important;
  border-color: #f1b8af !important;
  background: #fff4f2 !important;
}

@media (max-width: 700px) {
  #taskModal .task-modal-content .day-plan-card.single {
    grid-template-columns: 1fr !important;
  }
}

body.theme-dark #taskModal .task-modal-content .copy-active-day-btn,
body.theme-dark #taskModal .task-modal-content .paste-active-day-btn {
  background: #203653 !important;
  border-color: #526b91 !important;
  color: #9cc2ff !important;
}

/* Task modal dark theme: readable calendar, crew and equipment panels. */
body.theme-dark #taskModal .task-modal-content {
  background: #1f2b3c !important;
  color: #edf3fb !important;
  border-color: #455873 !important;
}

body.theme-dark #taskModal .task-modal-content .form-row label,
body.theme-dark #taskModal .task-modal-content .mini-calendar-weekdays,
body.theme-dark #taskModal .task-modal-content .mini-calendar-selected,
body.theme-dark #taskModal .task-modal-content .equipment-total,
body.theme-dark #taskModal .task-modal-content .equipment-total span {
  color: #c5d0df !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar,
body.theme-dark #taskModal .task-modal-content .day-plan-card.single,
body.theme-dark #taskModal .task-modal-content .task-flags-row,
body.theme-dark #taskModal .task-modal-content .billing-section,
body.theme-dark #taskModal .task-modal-content .ekip-section,
body.theme-dark #taskModal .task-modal-content .equipment-section,
body.theme-dark #taskModal .task-modal-content .equipment-master-body,
body.theme-dark #taskModal .task-modal-content .equipment-group-body {
  background: #223148 !important;
  border: 1px solid #455873 !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-head strong,
body.theme-dark #taskModal .task-modal-content .day-plan-head strong,
body.theme-dark #taskModal .task-modal-content .ekip-section h4,
body.theme-dark #taskModal .task-modal-content .equipment-section h4 {
  color: #f2f6fb !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-head button,
body.theme-dark #taskModal .task-modal-content .mini-calendar-actions button,
body.theme-dark #taskModal .task-modal-content .remove-active-days-btn {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #f2f6fb !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-day {
  background: #2a3a52 !important;
  border: 1px solid #3e5069 !important;
  color: #dbe5f1 !important;
  opacity: 1 !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-day.muted {
  background: #243247 !important;
  color: #8fa0b6 !important;
  opacity: 1 !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-day:hover {
  background: #31435d !important;
  color: #fff !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-day.selected,
body.theme-dark #taskModal .task-modal-content .mini-calendar-day.active-planner-day {
  background: #2f66c9 !important;
  border-color: #7da6ff !important;
  color: #fff !important;
  box-shadow: none !important;
}

body.theme-dark #taskModal .task-modal-content .mini-calendar-day.today {
  border-color: #f59e0b !important;
  box-shadow: inset 0 0 0 1px #f59e0b !important;
}

body.theme-dark #taskModal .task-modal-content .day-tab {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #e4ebf5 !important;
}

body.theme-dark #taskModal .task-modal-content .day-tab.active {
  background: #2f66c9 !important;
  border-color: #7da6ff !important;
  color: #fff !important;
}

body.theme-dark #taskModal .task-modal-content .day-tab.configured::after {
  background: #7da6ff !important;
}

body.theme-dark #taskModal .task-modal-content .checkbox-row,
body.theme-dark #taskModal .task-modal-content .mini-check,
body.theme-dark #taskModal .task-modal-content .equipment-master-title,
body.theme-dark #taskModal .task-modal-content .equipment-group-title,
body.theme-dark #taskModal .task-modal-content .equipment-row {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .equipment-master-title em,
body.theme-dark #taskModal .task-modal-content .equipment-group-title em,
body.theme-dark #taskModal .task-modal-content .equipment-name,
body.theme-dark #taskModal .task-modal-content .equipment-name span {
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .equipment-master-title::after,
body.theme-dark #taskModal .task-modal-content .equipment-group-title::after {
  color: #dbeafe !important;
}

body.theme-dark #taskModal .task-modal-content input,
body.theme-dark #taskModal .task-modal-content select,
body.theme-dark #taskModal .task-modal-content textarea,
body.theme-dark #taskModal .task-modal-content .day-phase-input,
body.theme-dark #taskModal .task-modal-content .billing-section input[type="text"],
body.theme-dark #taskModal .task-modal-content .equipment-row input[type="number"] {
  background: #243249 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content input::placeholder,
body.theme-dark #taskModal .task-modal-content textarea::placeholder {
  color: #9aa8bb !important;
}

body.theme-dark #taskModal .task-modal-content .equipment-total,
body.theme-dark #taskModal .task-modal-content .equipment-total-grand {
  background: #243249 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

/* Task modal dark theme: crew department/person accordion readability. */
body.theme-dark #taskModal .task-modal-content .ekip-section {
  background: #223148 !important;
  border-color: #455873 !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-group {
  background: #243249 !important;
  border-color: #52657f !important;
  box-shadow: none !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-group-title {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-group-title span,
body.theme-dark #taskModal .task-modal-content .ekip-group-title em,
body.theme-dark #taskModal .task-modal-content .ekip-group-title::after {
  color: #edf3fb !important;
  opacity: 1 !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-group-title em {
  color: #c5d0df !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-group-body {
  background: #1f2b3c !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .post-crew-checkboxes,
body.theme-dark #taskModal .task-modal-content .post-crew-empty {
  background: #1f2b3c !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .post-crew-help {
  color: #c5d0df !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-checkbox {
  color: #edf3fb !important;
  opacity: 1 !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-checkbox span {
  color: #edf3fb !important;
  opacity: 1 !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-checkbox input[type="checkbox"] {
  accent-color: #7da6ff;
  background: #243249 !important;
  border-color: #52657f !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-checkbox .freelance-name-input {
  background: #2a3a52 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark #taskModal .task-modal-content .ekip-checkbox .freelance-name-input::placeholder {
  color: #aab7c9 !important;
}

/* Mobile/cell summary dark theme readability. */
body.theme-dark .cell-preview {
  background: #1f2b3c !important;
  border-color: #455873 !important;
  color: #edf3fb !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.36) !important;
}

body.theme-dark .cell-preview-head {
  border-bottom-color: #455873 !important;
}

body.theme-dark .cell-preview-head strong {
  color: #f4f7fb !important;
}

body.theme-dark .cell-preview-head span {
  color: #c5d0df !important;
}

body.theme-dark .cell-preview-task {
  background: #243249 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark .cell-preview-task:hover {
  background: #2a3a52 !important;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .cell-preview-task strong {
  color: #f4f7fb !important;
}

body.theme-dark .cell-preview-task em {
  color: #c5d0df !important;
}

body.theme-dark .cell-preview-task small,
body.theme-dark .cell-preview-task small span {
  color: #d8e2ef !important;
}

body.theme-dark .cell-preview-flags {
  color: #f4f7fb !important;
}

body.theme-dark .cell-preview-flag {
  background: #1f2b3c !important;
  border-color: #52657f !important;
}

body.theme-dark .cell-preview-flag em {
  color: #d8e2ef !important;
}

/* Mobile agenda dark theme readability and controls. */
body.theme-dark .mobile-agenda {
  color: #edf3fb;
}

body.theme-dark .mobile-agenda-title {
  color: #f4f7fb;
}

body.theme-dark .mobile-agenda-controls select {
  background: #243249 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

body.theme-dark .mobile-date-section {
  background: #223148 !important;
  border-color: #455873 !important;
  color: #edf3fb !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22) !important;
}

body.theme-dark .mobile-date-section h4 {
  color: #f4f7fb !important;
}

body.theme-dark .mobile-weekday-label {
  color: #c5d0df !important;
}

body.theme-dark .mobile-date-section.mobile-date-holiday {
  background: #161c2b !important;
  border-color: #65414c !important;
}

body.theme-dark .mobile-date-section.mobile-date-holiday h4,
body.theme-dark .mobile-date-section.mobile-date-holiday .mobile-weekday-label {
  color: #f3a5a5 !important;
}

body.theme-dark .mobile-date-section.mobile-date-today {
  background: #172b42 !important;
  border-color: #3f7eea !important;
  box-shadow: inset 0 0 0 2px rgba(63, 126, 234, 0.72), 0 10px 24px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .mobile-date-section.mobile-date-holiday.mobile-date-today {
  background: #172b42 !important;
  border-color: #3f7eea !important;
}

body.theme-dark .mobile-date-section.mobile-date-today h4 {
  color: #d9e7ff !important;
}

body.theme-dark .mobile-today-badge {
  background: #3f7eea !important;
  color: #fff !important;
}

body.theme-dark .mobile-empty-day {
  border-top-color: rgba(63, 126, 234, 0.42) !important;
  color: #d9e7ff !important;
}

body.theme-dark .mobile-task-detail {
  border-top-color: #455873 !important;
}

body.theme-dark .mobile-task-detail summary {
  color: #edf3fb !important;
}

body.theme-dark .mobile-task-detail summary strong {
  color: #edf3fb !important;
}

body.theme-dark .mobile-task-detail summary::after {
  color: #c5d0df !important;
}

body.theme-dark .mobile-task-body {
  color: #d8e2ef !important;
}

body.theme-dark .mobile-task-body strong {
  color: #f4f7fb !important;
}

body.theme-dark .mobile-task-row {
  border-top-color: #455873 !important;
  color: #edf3fb !important;
}

body.theme-dark .mobile-task-row-main strong {
  color: #f4f7fb !important;
}

body.theme-dark .mobile-task-row-main em,
body.theme-dark .mobile-task-row-plus {
  color: #c5d0df !important;
}

body.theme-dark .mobile-task-sheet-backdrop {
  background: rgba(4, 10, 20, 0.58) !important;
}

body.theme-dark .mobile-task-sheet-panel {
  background: #223148 !important;
  border-color: #52657f !important;
  box-shadow: 0 -22px 48px rgba(0, 0, 0, 0.36) !important;
}

body.theme-dark .mobile-task-sheet-grip {
  background: #6f8199 !important;
}

body.theme-dark .mobile-task-sheet-head {
  border-bottom-color: #455873 !important;
}

body.theme-dark .mobile-task-sheet-head span,
body.theme-dark .mobile-task-sheet-row span,
body.theme-dark .mobile-task-sheet-section > span {
  color: #c5d0df !important;
}

body.theme-dark .mobile-task-sheet-head h3,
body.theme-dark .mobile-task-sheet-row strong,
body.theme-dark .mobile-task-sheet-section p,
body.theme-dark .mobile-task-sheet-section li {
  color: #f4f7fb !important;
}

body.theme-dark .mobile-task-sheet-head button,
body.theme-dark .mobile-task-sheet-status,
body.theme-dark .mobile-task-sheet-row,
body.theme-dark .mobile-task-sheet-section {
  background: #243249 !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
}

/* Mobile layout lock: stable portrait and landscape grid. */
@media (max-width: 720px) {
  .header {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px 14px !important;
  }

  .brand {
    width: 100% !important;
    height: auto !important;
    padding-right: 0 !important;
    border-right: 0 !important;
  }

  .brand-logo {
    width: min(260px, 100%) !important;
    max-width: 100% !important;
  }

  .controls {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 6px !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .controls > * {
    min-width: 0 !important;
  }

  .controls .user-pill {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-self: stretch !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .controls .sync-status {
    justify-self: start !important;
  }

  .controls select,
  .controls > button:not(#changePasswordBtn) {
    display: none !important;
  }

  .controls #changePasswordBtn {
    display: inline-grid !important;
  }
}

@media (hover: none) and (pointer: coarse) and (max-height: 560px) and (orientation: landscape) {
  :root {
    --dept-col-width: 22px;
    --name-col-width: calc(450px * var(--zoom));
    --day-col-width: calc(300px * var(--zoom));
    --row-height: calc(132px * var(--zoom));
  }

  html,
  body {
    width: 100vw;
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
    overscroll-behavior: none;
    background: #f5f7fb;
  }

  body.theme-dark {
    background: #1e293b !important;
  }

  .header {
    position: sticky !important;
    grid-template-columns: minmax(148px, 0.34fr) minmax(0, 1fr) !important;
    gap: 6px !important;
    padding: 5px 8px 5px max(24px, calc(env(safe-area-inset-left, 0px) + 14px)) !important;
    min-height: 42px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
  }

  .brand {
    height: 30px !important;
    padding-left: 4px !important;
    padding-right: 0 !important;
    border-right: 0 !important;
  }

  .brand-logo {
    width: min(190px, 100%) !important;
    height: 26px !important;
  }

  .controls {
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    overflow: visible !important;
    gap: 4px !important;
  }

  .controls .user-pill,
  .controls .sync-status {
    display: none !important;
  }

  .controls select {
    display: inline-block !important;
    width: auto !important;
    min-width: 78px !important;
    max-width: 108px !important;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 24px 0 9px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  .controls #yearSelect {
    min-width: 86px !important;
    max-width: 96px !important;
    padding-right: 26px !important;
  }

  .controls > button:not(#changePasswordBtn):not(#yonetimBtn),
  .filter-panel {
    display: none !important;
  }

  .controls .sheet-zoom-control {
    display: none !important;
  }

  .controls #yonetimBtn,
  .controls #changePasswordBtn {
    min-height: 30px !important;
    height: 30px !important;
    border-radius: 10px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }

  .controls #changePasswordBtn {
    width: 34px !important;
    padding: 0 !important;
  }

  .grid-wrapper {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100svh - 42px) !important;
    overflow: auto !important;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: none !important;
    border-top: 1px solid #d8e2ef !important;
    background: var(--surface) !important;
  }

  body.task-modal-open .grid-wrapper {
    touch-action: auto !important;
  }

  #mainTable {
    font-size: 12px !important;
  }

  #mainTable th:first-child,
  #mainTable .dept-label {
    left: 0 !important;
    min-width: var(--dept-col-width) !important;
    width: var(--dept-col-width) !important;
    max-width: var(--dept-col-width) !important;
  }

  #mainTable .dept-label {
    overflow: hidden !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    font-size: 10px !important;
    letter-spacing: 1.1px !important;
    z-index: 18 !important;
  }

  #mainTable .dept-label span {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(180deg) scale(var(--dept-label-scale, 1)) !important;
    transform-origin: center !important;
    writing-mode: vertical-rl !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    letter-spacing: var(--dept-label-letter-spacing, 1.1px) !important;
    line-height: 1 !important;
  }

  #mainTable th:nth-child(2),
  #mainTable .name-col {
    left: var(--dept-col-width) !important;
    min-width: var(--name-col-width) !important;
    width: var(--name-col-width) !important;
    max-width: var(--name-col-width) !important;
  }

  #mainTable .name-cell {
    min-width: var(--name-col-width) !important;
  }

  #mainTable .name-col {
    z-index: 16 !important;
    padding: 0 8px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    box-shadow: 1px 0 0 0 #bfd4e8 !important;
  }

  #mainTable th:not(:first-child):not(:nth-child(2)),
  #mainTable .day-cell {
    min-width: var(--day-col-width) !important;
    width: var(--day-col-width) !important;
  }

  #mainTable .task-container {
    top: 2px !important;
    left: 2px !important;
    right: 2px !important;
    bottom: 2px !important;
    gap: 1px !important;
  }

  #mainTable .task-bar,
  #mainTable .more-tasks {
    position: relative !important;
    min-height: 17px !important;
    max-height: 19px !important;
    border-radius: 5px !important;
    padding: 1px 6px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    border-width: 1px !important;
  }

  #mainTable .task-container.single-task {
    justify-content: center !important;
  }

  #mainTable .task-container.single-task .task-bar {
    min-height: 24px !important;
    max-height: 34px !important;
    padding: 2px 7px !important;
    font-size: 12px !important;
  }

  #mainTable .task-bar::before,
  #mainTable .more-tasks::before {
    content: "" !important;
    position: absolute !important;
    inset: -8px -3px !important;
    z-index: 0 !important;
  }

  #mainTable .task-bar > *,
  #mainTable .more-tasks > * {
    position: relative !important;
    z-index: 1 !important;
  }

  #mainTable .task-title {
    font-size: 11px !important;
    line-height: 1.1 !important;
  }

  #mainTable .task-container.single-task .task-title {
    font-size: 12px !important;
  }

  #mainTable .task-phase {
    font-size: 9px !important;
    line-height: 1 !important;
    padding: 1px 4px !important;
  }

  .mobile-agenda {
    display: none !important;
  }

  #taskModal {
    position: fixed !important;
    inset: 0 !important;
    width: 100svw !important;
    height: 100svh !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: 8px !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    touch-action: none !important;
  }

  #taskModal.modal[style*="flex"] .modal-content,
  #taskModal.modal[style*="flex"] .task-modal-content {
    animation: none !important;
    transform: none !important;
  }

  #taskModal .task-modal-content {
    position: relative !important;
    width: min(760px, calc(100svw - 16px)) !important;
    max-width: min(760px, calc(100svw - 16px)) !important;
    height: calc(100svh - 16px) !important;
    max-height: calc(100svh - 16px) !important;
    margin: 0 auto !important;
    border-radius: 18px !important;
    padding: 14px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    transform: none !important;
  }

  #taskModal .btn-row {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10050 !important;
    width: auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin: 14px -14px -14px !important;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid #d8e2ef !important;
    border-radius: 0 0 18px 18px !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08) !important;
    pointer-events: auto !important;
    transform: none !important;
    touch-action: manipulation !important;
  }

  #taskModal #shareTaskBtn,
  #taskModal #deleteBtn {
    display: none !important;
  }

  #taskModal .btn-row #cancelTaskBtn,
  #taskModal .btn-row #saveTaskBtn {
    min-height: 44px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
  }

  #taskModal .ekip-section,
  #taskModal .equipment-section {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  #taskModal .ekip-group-title {
    min-height: 46px !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
  }

  #taskModal .ekip-group-body {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  #taskModal .ekip-group.open .ekip-group-body {
    display: grid !important;
  }

  #taskModal .ekip-checkbox {
    min-height: 44px !important;
    padding: 9px 10px !important;
    border: 1px solid #d8e2ef !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    touch-action: auto !important;
    user-select: none !important;
  }

  #taskModal .ekip-checkbox span {
    pointer-events: auto !important;
  }

  #taskModal .modal-resize-handle {
    display: none !important;
  }

  #taskModal .ekip-checkbox input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
  }

  #taskModal .ekip-checkbox .freelance-name-input {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    height: 36px !important;
    margin-left: 0 !important;
    grid-column: 1 / -1 !important;
  }

  #taskModal .equipment-row {
    grid-template-columns: minmax(0, 1fr) 88px 92px !important;
    gap: 7px 22px !important;
    align-items: center !important;
    padding: 10px !important;
    border: 1px solid #e3ebf5 !important;
    border-radius: 12px !important;
    margin: 8px 0 !important;
  }

  #taskModal .equipment-name {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 3 !important;
    min-width: 0 !important;
    font-size: 12.5px !important;
    line-height: 1.15 !important;
  }

  #taskModal .equipment-name span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #taskModal .equipment-mobile-stepper {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    display: grid !important;
    grid-template-columns: 22px minmax(24px, 1fr) 22px !important;
    align-items: center !important;
    gap: 3px !important;
    width: 88px !important;
    max-width: 88px !important;
    min-width: 88px !important;
    height: 32px !important;
    min-height: 32px !important;
    box-sizing: border-box !important;
    border: 1px solid #d8e2ef !important;
    border-radius: 10px !important;
    background: #fff !important;
    padding: 2px !important;
  }

  #taskModal .equipment-mobile-stepper button {
    width: 22px !important;
    height: 24px !important;
    min-height: 24px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd8e6 !important;
    background: #f4f7fb !important;
    color: #172033 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    padding: 0 !important;
    touch-action: manipulation !important;
  }

  #taskModal .equipment-mobile-stepper strong {
    color: #172033 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-align: center !important;
    min-width: 0 !important;
  }

  #taskModal .equipment-mobile-stepper.disabled {
    opacity: 0.45 !important;
  }

  #taskModal .equipment-row input[data-equipment-price] {
    display: block !important;
    grid-column: 3 / 4 !important;
    grid-row: 1 / 2 !important;
    width: 92px !important;
    max-width: 92px !important;
    min-width: 92px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    box-sizing: border-box !important;
    padding: 5px 8px !important;
    font-size: 12px !important;
  }

  #taskModal .equipment-type-options {
    grid-column: 2 / 4 !important;
    grid-row: 2 / 3 !important;
    min-width: 0 !important;
    gap: 14px !important;
    justify-content: flex-start !important;
    padding-left: 0 !important;
    font-size: 12px !important;
  }

  #taskModal .equipment-type-options input {
    width: 18px !important;
    height: 18px !important;
  }

  body.theme-dark #taskModal .btn-row {
    background: rgba(31, 43, 60, 0.96) !important;
    border-top-color: #52657f !important;
  }

  body.theme-dark #taskModal .btn-row #cancelTaskBtn,
  body.theme-dark #taskModal .ekip-checkbox,
  body.theme-dark #taskModal .equipment-mobile-stepper {
    background: #243249 !important;
    border-color: #52657f !important;
    color: #edf3fb !important;
  }

  body.theme-dark #taskModal .equipment-mobile-stepper button {
    background: #1f2b3c !important;
    border-color: #52657f !important;
    color: #edf3fb !important;
  }

  body.theme-dark #taskModal .equipment-mobile-stepper strong {
    color: #edf3fb !important;
  }
}

@supports (-webkit-touch-callout: none) {
  .dept-label {
    border-bottom: 0 !important;
    box-shadow: inset 0 -1px 0 rgba(174, 180, 189, 0.85) !important;
  }

  tr.dept-last-row > td {
    border-bottom: 1px solid #b8c5d3 !important;
    box-shadow: inset 0 -1px 0 rgba(139, 157, 180, 0.18) !important;
  }

  .dept-spacer {
    height: max(6px, calc(10px * var(--zoom))) !important;
    background: #f4f6f9 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: inset 0 1px 0 #b8c5d3, inset 0 -1px 0 #b8c5d3 !important;
  }

  .dept-spacer td {
    height: max(6px, calc(10px * var(--zoom))) !important;
    background: #f4f6f9 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: inset 0 1px 0 #b8c5d3, inset 0 -1px 0 #b8c5d3 !important;
  }
}

@media (hover: none) and (pointer: coarse) and (max-height: 560px) and (orientation: landscape) {
  #mainTable tbody tr:not(.dept-spacer) {
    height: var(--row-height) !important;
    min-height: var(--row-height) !important;
    max-height: var(--row-height) !important;
  }

  #mainTable tbody tr:not(.dept-spacer) > td:not(.dept-label) {
    height: var(--row-height) !important;
    min-height: var(--row-height) !important;
    max-height: var(--row-height) !important;
    box-sizing: border-box !important;
  }

  #mainTable .dept-label.mobile-dept-cell {
    height: var(--row-height) !important;
    min-height: var(--row-height) !important;
    max-height: var(--row-height) !important;
    border-bottom: 0 !important;
    overflow: visible !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18) !important;
  }

  #mainTable .dept-label.mobile-dept-cell span:empty {
    display: none !important;
  }

  #mainTable tr.dept-last-row > td {
    height: var(--row-height) !important;
    min-height: var(--row-height) !important;
    max-height: var(--row-height) !important;
    border-bottom: 2px solid #b8c5d3 !important;
    box-shadow: inset 0 -1px 0 rgba(139, 157, 180, 0.16) !important;
  }

  #mainTable tr.dept-spacer,
  #mainTable tr.dept-spacer td {
    height: 5px !important;
    min-height: 5px !important;
    max-height: 5px !important;
    padding: 0 !important;
    line-height: 0 !important;
    font-size: 0 !important;
    background: #eef4fa !important;
    border-top: 1px solid #b8c5d3 !important;
    border-bottom: 1px solid #cbd8e6 !important;
    box-shadow: none !important;
  }

  body.theme-dark #mainTable tr.dept-last-row > td {
    border-bottom-color: #52657f !important;
  }

  body.theme-dark #mainTable tr.dept-spacer,
  body.theme-dark #mainTable tr.dept-spacer td {
    background: #243249 !important;
    border-top-color: #52657f !important;
    border-bottom-color: #40516b !important;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
  #mainTable tbody tr:not(.dept-spacer),
  #mainTable tbody tr:not(.dept-spacer) > td {
    height: var(--row-height) !important;
    min-height: var(--row-height) !important;
    max-height: var(--row-height) !important;
    box-sizing: border-box !important;
  }

  #mainTable .dept-label.mobile-dept-cell {
    overflow: visible !important;
    border-bottom: 0 !important;
    border-right: 1.5px solid #93a5b8 !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18) !important;
  }

  #mainTable .dept-label.mobile-dept-cell span {
    z-index: 2 !important;
    pointer-events: none !important;
  }

  #mainTable .dept-label.mobile-dept-cell span:empty {
    display: none !important;
  }

  #mainTable tr.dept-last-row > .dept-label.mobile-dept-cell,
  #mainTable tr.dept-last-row > td {
    height: var(--row-height) !important;
    min-height: var(--row-height) !important;
    max-height: var(--row-height) !important;
    border-bottom: 2px solid #b8c5d3 !important;
  }

  #mainTable tbody tr:not(.dept-spacer) > td:not(.dept-label) {
    border-right: 1.5px solid #cfdbe8 !important;
    border-bottom: 1.5px solid #cfdbe8 !important;
    box-shadow: inset 0 -1px 0 rgba(139, 157, 180, 0.10) !important;
  }

  #mainTable tr.dept-last-row > td:not(.dept-label) {
    border-bottom: 2px solid #b8c5d3 !important;
    box-shadow: inset 0 -1px 0 rgba(139, 157, 180, 0.18) !important;
  }

  #mainTable tr.dept-last-row > .dept-label.mobile-dept-cell {
    border-bottom: 0 !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.18) !important;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  .header {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px 12px !important;
    align-items: center !important;
    min-height: calc(env(safe-area-inset-top, 0px) + 68px) !important;
  }

  .header .brand {
    width: 100% !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    border-right: 0 !important;
    padding-right: 0 !important;
  }

  .header .brand-logo {
    width: min(280px, calc(100% - 52px)) !important;
    max-width: calc(100% - 52px) !important;
    flex: 0 1 280px !important;
    height: 34px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .header .brand-logo img {
    max-height: 34px !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .header .mobile-refresh-btn:not(.hidden) {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    flex: 0 0 38px !important;
    margin-left: auto !important;
    padding: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #c8d5e5 !important;
    border-radius: 50% !important;
    background: linear-gradient(180deg, #ffffff 0%, #edf3f9 100%) !important;
    color: #243447 !important;
    box-shadow:
      0 5px 14px rgba(15, 23, 42, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    appearance: none !important;
    touch-action: manipulation !important;
  }

  .header .mobile-refresh-btn svg {
    width: 21px !important;
    height: 21px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  .header .mobile-refresh-btn:active {
    transform: scale(0.94) !important;
  }

  .header .mobile-refresh-btn.is-refreshing svg {
    animation: mobile-refresh-spin 0.7s linear infinite !important;
  }

  .header .controls {
    display: none !important;
  }

  #taskModal #shareTaskBtn {
    color: transparent !important;
    font-size: 0 !important;
    white-space: nowrap !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: hidden !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #taskModal #shareTaskBtn::after {
    content: attr(data-mobile-label) !important;
    display: block !important;
    color: #172033 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.theme-dark #taskModal #shareTaskBtn::after {
    color: #edf3fb !important;
  }

  #taskModal .equipment-group-body {
    padding: 10px !important;
    max-height: none !important;
    overflow: visible !important;
  }

  #taskModal .equipment-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px 10px !important;
    align-items: center !important;
    padding: 12px 10px !important;
    border-bottom: 1px solid #edf2f7 !important;
  }

  #taskModal .equipment-row:last-child {
    border-bottom: 0 !important;
  }

  #taskModal .equipment-name {
    grid-column: 1 / -1 !important;
    min-height: 32px !important;
    font-size: 14px !important;
    line-height: 1.15 !important;
  }

  #taskModal .equipment-name span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  #taskModal .equipment-mobile-stepper {
    grid-column: 1 / 2 !important;
    width: 128px !important;
    max-width: 128px !important;
    min-height: 38px !important;
  }

  #taskModal .equipment-mobile-stepper button {
    width: 38px !important;
    height: 34px !important;
    min-height: 34px !important;
  }

  #taskModal .equipment-row input[data-equipment-price] {
    grid-column: 2 / 3 !important;
    width: 86px !important;
    max-width: 86px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 6px 8px !important;
    font-size: 13px !important;
  }

  #taskModal .equipment-type-options {
    grid-column: 1 / -1 !important;
    justify-content: flex-start !important;
    gap: 16px !important;
    padding-left: 34px !important;
    font-size: 13px !important;
  }

  #taskModal .equipment-type-options input {
    width: 20px !important;
    height: 20px !important;
  }

  .filter-panel,
  .sheet-zoom-control {
    display: none !important;
  }

  .mobile-agenda-head {
    position: sticky !important;
    top: calc(env(safe-area-inset-top, 0px) + 68px) !important;
    z-index: 90 !important;
    margin: -14px -14px 14px !important;
    padding: 14px !important;
    background: var(--page-bg, #f5f7fb) !important;
    border-bottom: 1px solid rgba(198, 210, 226, 0.78) !important;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08) !important;
  }

  body.theme-dark .mobile-agenda-head {
    background: #1e293b !important;
    border-bottom-color: #40516b !important;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22) !important;
  }
}

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

body.theme-dark .header .mobile-refresh-btn:not(.hidden) {
  background: linear-gradient(180deg, #26364c 0%, #172235 100%) !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark .filter-panel .desktop-refresh-btn:not(.hidden) {
  background: linear-gradient(180deg, #26364c 0%, #172235 100%) !important;
  border-color: #52657f !important;
  color: #edf3fb !important;
  box-shadow:
    0 5px 14px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

@media (hover: none) and (pointer: coarse) and (max-height: 560px) and (orientation: landscape) {
  #taskModal .equipment-row {
    grid-template-columns: minmax(210px, 1fr) 74px 104px 178px !important;
    gap: 8px 14px !important;
    align-items: center !important;
    padding: 9px 12px !important;
  }

  #taskModal .equipment-name {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
    min-height: 30px !important;
    align-items: center !important;
  }

  #taskModal .equipment-mobile-stepper {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    width: 74px !important;
    min-width: 74px !important;
    max-width: 74px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    grid-template-columns: 20px 1fr 20px !important;
    gap: 2px !important;
    padding: 2px !important;
    align-self: center !important;
  }

  #taskModal .equipment-mobile-stepper button {
    width: 20px !important;
    min-width: 20px !important;
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    line-height: 1 !important;
  }

  #taskModal .equipment-mobile-stepper strong {
    font-size: 12px !important;
    line-height: 1 !important;
  }

  #taskModal .equipment-row input[data-equipment-price],
  #taskModal .equipment-row input[type="number"][data-equipment-price] {
    grid-column: 3 / 4 !important;
    grid-row: 1 / 2 !important;
    width: 104px !important;
    min-width: 104px !important;
    max-width: 104px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    align-self: center !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  #taskModal .equipment-type-options {
    grid-column: 4 / 5 !important;
    grid-row: 1 / 2 !important;
    align-self: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding-left: 0 !important;
    min-width: 0 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
  #taskModal {
    inset: 0 !important;
    width: 100vw !important;
    width: 100svw !important;
    width: 100dvw !important;
    max-width: 100vw !important;
    max-width: 100svw !important;
    max-width: 100dvw !important;
    min-width: 0 !important;
    padding: 8px !important;
    padding-left: max(8px, env(safe-area-inset-left)) !important;
    padding-right: max(8px, env(safe-area-inset-right)) !important;
    justify-content: center !important;
    align-items: stretch !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #taskModal .modal-content,
  #taskModal .task-modal-content {
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: calc(100vw - 16px) !important;
    width: calc(100svw - 16px) !important;
    width: calc(100dvw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-width: calc(100svw - 16px) !important;
    max-width: calc(100dvw - 16px) !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
}

/* Management panel: readable permission row and easier sort handles. */
#yonetimYetki .add-new-box {
  grid-template-columns:
    minmax(110px, 0.42fr)
    minmax(190px, 1fr)
    minmax(118px, 0.4fr)
    minmax(96px, 108px)
    minmax(82px, 94px)
    minmax(78px, 90px)
    var(--admin-add-btn-w) !important;
  grid-auto-flow: column !important;
  overflow: visible !important;
}

#yonetimYetki .row-user {
  grid-template-columns:
    minmax(108px, 0.42fr)
    minmax(190px, 1fr)
    minmax(118px, 0.4fr)
    minmax(96px, 108px)
    minmax(82px, 94px)
    minmax(78px, 90px)
    56px !important;
  gap: 5px !important;
  overflow: visible !important;
}

#yonetimYetki #newAppUsername,
#yonetimYetki .username-input {
  min-width: 0 !important;
}

#yonetimYetki #newAppUserEmail,
#yonetimYetki .email-input {
  min-width: 0 !important;
}

#yonetimYetki .add-new-box .mini-check,
#yonetimYetki .row-user .mini-check {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 108px !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  padding-inline: 6px !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.1px !important;
}

#yonetimYetki .add-new-box .mini-check input[type="checkbox"],
#yonetimYetki .row-user .mini-check input[type="checkbox"] {
  flex-basis: 15px !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  border-width: 1.5px !important;
  border-radius: 4px !important;
}

#yonetimYetki .add-new-box .mini-check input[type="checkbox"]::after,
#yonetimYetki .row-user .mini-check input[type="checkbox"]::after {
  width: 4px !important;
  height: 7px !important;
  border-right-width: 1.5px !important;
  border-bottom-width: 1.5px !important;
}

#yonetimYetki .add-new-box .mini-check span,
#yonetimYetki .row-user .mini-check span {
  display: inline-block !important;
  min-width: 0 !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.yonetim-modal-content .drag-handle {
  position: relative !important;
  width: 44px !important;
  min-width: 44px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 11px !important;
  font-size: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  text-indent: -999px !important;
  color: transparent !important;
  cursor: grab !important;
  touch-action: none !important;
  user-select: none !important;
}

.yonetim-modal-content .drag-handle::before {
  content: "⋮⋮" !important;
  display: block !important;
  color: #65758d !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  letter-spacing: 1px !important;
  line-height: 1 !important;
  text-indent: 0 !important;
  transform: rotate(90deg) !important;
}

.yonetim-modal-content .drag-handle:hover,
.yonetim-modal-content .drag-handle:focus-visible {
  background: #eef6ff !important;
  border-color: #8fb8ef !important;
  color: #1f5fbf !important;
  box-shadow: 0 0 0 3px rgba(47, 107, 213, 0.12) !important;
  outline: none !important;
}

.yonetim-modal-content .drag-handle:hover::before,
.yonetim-modal-content .drag-handle:focus-visible::before {
  color: #1f5fbf !important;
}

#yonetimKisi .people-department-title,
#yonetimKisi .admin-sort-row[data-sort-type="person"],
#yonetimEkipman .equipment-category-title {
  grid-template-columns:
    44px
    minmax(0, 1fr)
    minmax(82px, 118px)
    50px !important;
}

#yonetimKisi .admin-sort-row[data-sort-type="person"] {
  grid-template-columns:
    44px
    minmax(150px, 1.35fr)
    minmax(120px, 0.48fr)
    50px !important;
}

#yonetimEkipman .equipment-category-title {
  grid-template-columns: 44px minmax(0, 1fr) 118px !important;
}

body.theme-dark .yonetim-modal-content .drag-handle:hover,
body.theme-dark .yonetim-modal-content .drag-handle:focus-visible {
  background: #263d5c !important;
  border-color: #6fa1ff !important;
}

@media (max-width: 900px) {
  #yonetimYetki .add-new-box,
  #yonetimYetki .row-user {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
  }

  #yonetimYetki .add-new-box .mini-check,
  #yonetimYetki .row-user .mini-check {
    max-width: none !important;
  }
}

/* Password Visibility Toggle Styles */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px !important;
}

.toggle-password-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  z-index: 5;
}

.toggle-password-btn:hover {
  color: #111;
}

.toggle-password-btn svg {
  width: 20px;
  height: 20px;
}

/*
 * Cover sub-pixel gaps between the two sticky identity columns.
 * At browser zoom levels a task color could otherwise peek through
 * as a thin blue line beside the vertical department label.
 */
#mainTable th:nth-child(2) {
  z-index: 17 !important;
  border-right-color: transparent !important;
  box-shadow:
    -2px 0 0 var(--table-baby-blue),
    inset -2px 0 0 var(--table-baby-blue-strong),
    inset 0 -2px 0 #aebdd0 !important;
}

#mainTable .name-col {
  z-index: 16 !important;
  isolation: isolate;
  border-right-color: transparent !important;
  background-clip: border-box;
  box-shadow:
    -2px 0 0 var(--table-baby-blue),
    inset -2px 0 0 #aeb4bd,
    inset 0 -1px 0 rgba(135, 154, 178, 0.24) !important;
}

body.theme-dark #mainTable th:nth-child(2) {
  box-shadow:
    -2px 0 0 var(--table-baby-blue),
    inset -2px 0 0 var(--table-baby-blue-strong),
    inset 0 -2px 0 #52657f !important;
}

body.theme-dark #mainTable .name-col {
  box-shadow:
    -2px 0 0 var(--table-baby-blue),
    inset -2px 0 0 #52657f,
    inset 0 -1px 0 rgba(148, 163, 184, 0.18) !important;
}

/* Yönetim sıralaması artık ayrı tutamaç yerine satırın tamamından yapılır. */
.yonetim-modal-content .admin-sort-row {
  cursor: grab !important;
  user-select: none;
}

.yonetim-modal-content .admin-sort-row.dragging {
  cursor: grabbing !important;
}

.yonetim-modal-content .admin-sort-row input[type="text"],
.yonetim-modal-content .admin-sort-row input[type="email"] {
  cursor: grab !important;
  user-select: text;
}

.yonetim-modal-content .admin-sort-row input[type="text"]:focus,
.yonetim-modal-content .admin-sort-row input[type="email"]:focus {
  cursor: text !important;
}

#yonetimKisi .people-department-title {
  grid-template-columns: minmax(0, 1fr) minmax(82px, 118px) 50px !important;
}

#yonetimKisi .admin-sort-row[data-sort-type="person"] {
  grid-template-columns: minmax(150px, 1.35fr) minmax(120px, 0.48fr) 50px !important;
}

#yonetimEkipman .equipment-category-title {
  grid-template-columns: minmax(0, 1fr) 118px !important;
}
