@import url("https://fonts.googleapis.com/css2?family=Geist:wght@100..900&family=Literata:opsz,wght@7..72,200..900&display=swap");

:root {
  --y-bg: #FFFFFF;
  --y-bg-warm: #F5F2EF;
  --y-pressed: #EDE8E3;
  --y-ink: #1F1D1B;
  --y-ink-2: #33302D;
  --y-text-2: #4D4A47;
  --y-text-3: #6E6A66;
  --y-decorative: #A39E99;
  --y-border: #E7E3DF;
  --y-gray-300: #D4CEC8;
  --y-link: #8A5A40;
  --y-error: #B33A28;
  --y-success: #3D7A4E;
  --y-warning: #A86A12;
  --y-warning-bg: #F8ECD8;
  --y-e-dark-bg: #1F1D1B;
  --y-e-dark-fg: #1F1D1B;
  --y-e-white-fg: #FFFFFF;
  --y-e38-bg: #EDE8E3;
  --y-e44-bg: #E7E3DF;
  --y-e72-bg: #33302D;
  --y-e72-fg: #1F1D1B;
  --y-font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --y-font-heading: "Literata", Georgia, "Times New Roman", serif;
  --y-radius-xs: 6px;
  --y-radius: 10px;
  --y-radius-card: 16px;
  --y-sidebar: #3A2A22;
  --y-sidebar-hover: #4A372D;
  --y-sidebar-active: #A8775B;
  --y-sidebar-text: #E3D3C8;
  --y-sidebar-text-active: #FFFFFF;
}

html[data-yepika-theme="dark"] {
  --y-bg: #211E1B;
  --y-bg-warm: #171513;
  --y-pressed: #2B2723;
  --y-ink: #F2EEEA;
  --y-ink-2: #E0DAD4;
  --y-text-2: #C9C2BB;
  --y-text-3: #A39C95;
  --y-decorative: #6E6862;
  --y-border: #36312D;
  --y-gray-300: #36312D;
  --y-link: #D9A98C;
  --y-error: #F08470;
  --y-success: #8CC79A;
  --y-warning: #E5B566;
  --y-warning-bg: #3A2D18;
  --y-e-dark-bg: #211E1B;
  --y-e-dark-fg: #171513;
  --y-e-white-fg: #F2EEEA;
  --y-e38-bg: #2B2723;
  --y-e44-bg: #36312D;
  --y-e72-bg: #36312D;
  --y-e72-fg: #C9C2BB;
  --y-sidebar: #211E1B;
  --y-sidebar-hover: #2B2723;
  --y-sidebar-active: #3A2A22;
  --y-sidebar-text: #D9C8BC;
  --y-sidebar-text-active: #D9A98C;
}

html, body { font-family: var(--y-font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--y-font-heading) !important; font-weight: 400 !important; letter-spacing: -0.01em; }
h1 > span, h2 > span, h3 > span { font-weight: 600 !important; }
h4, h5, h6 { font-weight: 500 !important; }
[data-qa="text"]:not(h1, h2, h3, h4, h5, h6), button, input, textarea, select { font-size-adjust: 0.56; }
::selection { background: var(--y-link); color: #FFFFFF; }

#dashboard-spine { background-color: var(--y-sidebar) !important; }
#dashboard-spine a, #dashboard-spine a *, #dashboard-spine button, #dashboard-spine button * {
  color: var(--y-sidebar-text) !important; fill: currentColor !important;
}
#dashboard-spine a[data-qa="navLink"]:not([aria-current="page"]):hover { background-color: var(--y-sidebar-hover) !important; }
#dashboard-spine a[data-qa="navLink"][aria-current="page"], #dashboard-spine a[data-qa="navLink"].selected { background-color: var(--y-sidebar-active) !important; }
#dashboard-spine a[aria-current="page"], #dashboard-spine a[aria-current="page"] * { color: var(--y-sidebar-text-active) !important; }

/* Белые карточки — скругление 16px */
[data-qa="card"] {
  border-radius: var(--y-radius-card) !important;
}
/* верхние блоки карточки повторяют её углы, если у них свой фон */
[data-qa="card"] > :first-child,
[data-qa="card"] > :first-child > :first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
[data-qa="card"] > :first-child > :first-child > :first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

/* Пустые состояния («No worker processes» и т.п.) */
[data-qa="emptystate"],
[data-qa="box"]:has(> [data-qa="emptystate"]) {
  border-radius: var(--y-radius-card) !important;
}

/* ---------- Логотип ---------- */
/* экран входа (нет сайдбара) */
body:not(:has(#dashboard-spine)) img[alt="logo"][src*="/assets/branding/"] {
  width: 180px !important;
  height: auto !important;
  max-width: none !important;
}
/* внутри панели */
body:has(#dashboard-spine) img[alt="logo"][src*="/assets/branding/"] {
  width: 130px !important;
  height: auto !important;
  max-width: none !important;
}

/* логотип в сайдбаре — фон первого блока */
#dashboard-spine:has(button[aria-label="Toggle navigation menu"]) > [data-qa="box"]:first-child > [data-qa="box"]:first-child {
  width: 130px !important;
}

/* Мелкие карточки в списках (серверы и т.п.) — скругление поменьше */
li > [data-qa="box"] > [data-qa="card"] {
  border-radius: 12px !important;
}
