/* Panel shell: hPanel-style layout, clinic brand colors.
   Topbar lives on body (fixed) so React DOM is never mutated. */
:root {
  --brand: #6eb0ba;
  --brand-dark: #4f97a1;
  --brand-soft: #8ec5ce;
  --ink: #1a2a2e;
  --side: #e9e9eb;
  --canvas: #f5f5f5;
  --line: #e6e6e8;
  --text: #1d1e20;
  --muted: #6b6b70;
  --top: 68px;
  --scrollbar-size: 0px;
  --scrollbar-size-thin: 0px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: transparent;
  --scrollbar-thumb-hover: transparent;
  --scrollbar-thumb-active: transparent;
}

html.dark {
  --canvas: #101516;
}

html {
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none;
}

* {
  scrollbar-width: none;
}

*::-webkit-scrollbar-track,
*::-webkit-scrollbar-thumb {
  background: transparent !important;
}

html,
body,
button,
input,
select,
textarea {
  font-family: Manrope, Inter, ui-sans-serif, sans-serif;
}

#hp-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  align-items: center;
  gap: 12px;
  height: var(--top);
  box-sizing: border-box;
  padding: 0 18px 0 16px;
  background: var(--ink);
  color: #fff;
  z-index: 80;
}

@media (min-width: 1024px) {
  html.hp-shell,
  html.hp-shell body {
    background: var(--ink) !important;
  }

  html.hp-shell #hp-topbar {
    display: flex;
  }

  /* hPanel: dark frame + rounded workspace below topbar */
  div.flex.h-screen.overflow-hidden {
    padding: var(--top) 10px 10px !important;
    background: var(--ink) !important;
    height: 100vh !important;
    height: 100dvh !important;
    box-sizing: border-box;
    gap: 0;
  }

  div.flex.h-screen.overflow-hidden > aside {
    width: 248px !important;
    background: var(--side) !important;
    border-right-color: transparent !important;
    border-radius: 28px 0 0 28px !important;
    overflow: visible !important;
    z-index: 40;
    position: relative;
  }

  /* Collapse arrow sits above main content */
  div.flex.h-screen.overflow-hidden > aside button.absolute {
    z-index: 50 !important;
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(26, 42, 46, 0.18) !important;
  }

  div.flex.h-screen.overflow-hidden > aside.w-\[72px\] {
    width: 76px !important;
  }

  div.flex.h-screen.overflow-hidden > main {
    background: var(--canvas) !important;
    padding: 24px 28px 36px !important;
    border-radius: 0 28px 28px 0 !important;
    overflow: auto;
    min-width: 0;
    position: relative;
    z-index: 1;
  }

  div.flex.h-screen.overflow-hidden > main > div {
    background: transparent;
    border: none;
    border-radius: 0;
    min-height: 0;
    padding: 0;
    box-shadow: none;
  }

  html.dark div.flex.h-screen.overflow-hidden > main > div {
    background: transparent;
    border: none;
  }

  div.flex.h-screen.overflow-hidden > aside > div:first-child {
    display: none !important;
  }

  div.flex.h-screen.overflow-hidden > main .rounded-2xl {
    border-radius: 20px !important;
  }

}

/* Page title blocks (date / h1 / subtitle) — nav already identifies the page */
main .shrink-0:has(.lg\:mb-5),
main .shrink-0:has(h1.text-2xl) {
  display: none !important;
}

@media (max-width: 1023px) {
  main .lg\:hidden.rounded-2xl.border.bg-white {
    display: none !important;
  }
}

.hp-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.hp-logo {
  width: auto;
  height: 40px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.hp-status {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.82);
}

.hp-date,
.hp-date-compact {
  font-size: 12px;
  font-weight: 600;
}

.hp-date-compact {
  display: none;
}

.hp-status-divider {
  width: 1px;
  height: 20px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.16);
}

.hp-time {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.hp-weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: inherit;
  text-decoration: none;
}

.hp-weather:hover {
  color: #fff;
}

.hp-weather-icon {
  display: inline-flex;
  color: var(--brand-soft);
  flex-shrink: 0;
}

.hp-weather-temp {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hp-weather-desc {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-icon-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.hp-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hp-user {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  box-sizing: border-box;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-decoration: none;
  max-width: 240px;
}

.hp-user:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hp-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid rgba(255, 125, 125, 0.28);
  border-radius: 999px;
  background: rgba(255, 90, 90, 0.08);
  color: #ffd7d7;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.hp-logout:hover,
.hp-logout:focus-visible {
  background: rgba(255, 90, 90, 0.18);
  color: #fff;
}

.hp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--brand);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.hp-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.hp-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

#hp-user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-user-sub {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

/* Desktop account controls live in the topbar. */
div.flex.h-screen.overflow-hidden > aside > .shrink-0.border-t {
  display: none !important;
}

aside nav {
  display: flex;
  flex-direction: column;
  padding-top: 14px !important;
}

aside nav .hp-sidebar-settings {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(26, 42, 46, 0.1);
  flex-shrink: 0;
}

html.dark aside nav .hp-sidebar-settings {
  border-top-color: rgba(255, 255, 255, 0.1);
}

aside nav .hp-sidebar-settings a svg {
  width: 22px !important;
  height: 22px !important;
  margin-left: -2px;
  margin-right: -2px;
  stroke-width: 2.2;
}

aside nav a {
  border-radius: 10px !important;
  color: #3c3c43;
  min-height: 36px;
}

aside nav a:hover {
  background: rgba(255, 255, 255, 0.55) !important;
  color: var(--text) !important;
}

aside nav a.bg-primary\/10 {
  background: #fff !important;
  color: var(--text) !important;
  box-shadow: 0 1px 2px rgba(26, 42, 46, 0.08);
}

aside nav a.bg-primary\/10 svg {
  color: var(--brand) !important;
}

aside button.absolute {
  background: #fff !important;
  border-color: #dedee2 !important;
  color: #6b6b70 !important;
}

aside .border-t {
  border-color: rgba(26, 42, 46, 0.08) !important;
}

html:not(.dark) main .rounded-2xl.bg-white,
html:not(.dark) main .rounded-2xl.border {
  border-color: var(--line) !important;
  box-shadow: 0 1px 2px rgba(26, 42, 46, 0.04);
}

a.bg-primary,
button.bg-primary {
  background-color: var(--brand) !important;
  color: #fff !important;
  border-radius: 9999px !important;
}

a.bg-primary:hover,
button.bg-primary:hover {
  background-color: var(--brand-dark) !important;
}

a.bg-primary:focus-visible,
button.bg-primary:focus-visible {
  outline: 3px solid rgba(110, 176, 186, 0.5);
  outline-offset: 2px;
}

html:not(.dark) main input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
html:not(.dark) main select,
html:not(.dark) main textarea {
  background: #fff;
  border-color: #e4e4e7;
  border-radius: 12px;
}

.absolute.inset-0.bg-primary {
  background: var(--ink) !important;
}

html.dark div.flex.h-screen.overflow-hidden {
  background: #0d1112 !important;
}

html.dark div.flex.h-screen.overflow-hidden > aside {
  background: #151a1b !important;
  border-right-color: transparent !important;
}

html.dark div.flex.h-screen.overflow-hidden > aside button.absolute {
  background: #273235 !important;
  border-color: #3d4a4e !important;
  color: #dce6e8 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

html.dark div.flex.h-screen.overflow-hidden > aside .border-t {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark aside nav a {
  color: #c8d0d2;
}

html.dark aside nav a.bg-primary\/10 {
  background: rgba(110, 176, 186, 0.16) !important;
  color: #fff !important;
  box-shadow: none;
}

html.dark aside nav a.bg-primary\/10 svg,
html.dark aside nav a:hover {
  color: #fff !important;
}

html.dark div.flex.h-screen.overflow-hidden > aside nav a:hover {
  background: rgba(110, 176, 186, 0.12) !important;
}

/* Shared filters retain the same geometry in both themes. */
.app-filter-group {
  gap: 2px;
  padding: 4px !important;
  border: 1px solid #d9e2e5;
  border-radius: 13px !important;
  background: #eaf0f2 !important;
  box-shadow: inset 0 1px 2px rgba(24, 49, 56, 0.03);
}

html.dark .app-filter-group {
  border-color: #344247;
  background: #1b2528 !important;
  box-shadow: none;
}

.app-filter {
  min-height: 40px;
  justify-content: center;
  border: 0;
  border-radius: 9px !important;
  color: #43545b !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.app-filter:hover {
  color: #1c3138 !important;
  background: #dce7ea !important;
}

.app-filter[aria-pressed="true"] {
  color: #172d34 !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(28, 50, 57, 0.14) !important;
}

html.dark .app-filter {
  color: #bac8cc !important;
}

html.dark .app-filter:hover {
  color: #f3f8f9 !important;
  background: #29383c !important;
}

html.dark .app-filter[aria-pressed="true"] {
  color: #f5fafb !important;
  background: #35474c !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

.app-filter:focus-visible {
  outline: 2px solid #65afba;
  outline-offset: 2px;
}

@media (min-width: 1024px) and (max-width: 1250px) {
  .hp-status { gap: 8px; }
  .hp-date { display: none; }
  .hp-date-compact { display: inline; }
  .hp-weather-desc { display: none; }
  .hp-user { max-width: 190px; }
}

@media (min-width: 1024px) and (max-width: 1100px) {
  .hp-logout { width: 44px; padding: 0; }
  .hp-logout span { display: none; }
}

/* Birth date fields need room for dd.mm.yyyy + calendar icon */
input[type="date"] {
  min-width: 11.5rem;
  min-height: 2.5rem;
  box-sizing: border-box;
}


/* finance-list-simplify: amounts like −₺120.000,00 stay on one line */
main .tabular-nums.whitespace-nowrap,
main p.tabular-nums.text-right {
  white-space: nowrap !important;
}
