/* Panel administratora w barwach marki: jasny nagłówek z logo jak w aplikacji, granat w nawigacji, fonty Montserrat/Inter.
   Panel ma jeden, jasny wygląd: te same wartości obowiązują przy ciemnym motywie systemu, przełącznik motywu jest ukryty. */
:root, html[data-theme="light"], html[data-theme="dark"], html[data-theme="auto"] {
  --primary: #27316c;
  --secondary: #21234d;
  --accent: #c570e8;
  --primary-fg: #fff;
  --body-fg: #15181e;
  --body-bg: #f6f7f9;
  --body-quiet-color: #626a78;
  --body-medium-color: #343b49;
  --body-loud-color: #15181e;
  --header-color: #343b49;
  --header-branding-color: #15181e;
  --header-bg: #fff;
  --header-link-color: #15181e;
  --breadcrumbs-fg: #c9cee8;
  --breadcrumbs-link-fg: #fff;
  --breadcrumbs-bg: #27316c;
  --link-fg: #27316c;
  --link-hover-color: #c570e8;
  --link-selected-fg: #21234d;
  --hairline-color: #e1e5eb;
  --border-color: #e1e5eb;
  --error-fg: #c8102e;
  --message-success-bg: #e8f6ee;
  --message-warning-bg: #fff6e0;
  --message-error-bg: #fdecef;
  --darkened-bg: #f1f3f6;
  --selected-bg: #eceefa;
  --selected-row: #f4f0fb;
  --button-fg: #fff;
  --button-bg: #27316c;
  --button-hover-bg: #21234d;
  --default-button-bg: #15181e;
  --default-button-hover-bg: #27316c;
  --close-button-bg: #626a78;
  --close-button-hover-bg: #343b49;
  --delete-button-bg: #c8102e;
  --delete-button-hover-bg: #9e0c24;
  --object-tools-fg: #fff;
  --object-tools-bg: #27316c;
  --object-tools-hover-bg: #c570e8;
  --font-family-primary: Inter, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root, html[data-theme="auto"] {
    --primary: #27316c; --secondary: #21234d; --body-fg: #15181e; --body-bg: #f6f7f9; --header-bg: #fff; --header-color: #343b49;
    --header-branding-color: #15181e; --header-link-color: #15181e; --breadcrumbs-bg: #27316c; --link-fg: #27316c; --darkened-bg: #f1f3f6;
    --selected-bg: #eceefa; --selected-row: #f4f0fb; --hairline-color: #e1e5eb; --border-color: #e1e5eb; --body-quiet-color: #626a78;
    --body-medium-color: #343b49; --body-loud-color: #15181e; --button-bg: #27316c; --button-hover-bg: #21234d; --default-button-bg: #15181e;
    --object-tools-bg: #27316c; --message-success-bg: #e8f6ee; --message-warning-bg: #fff6e0; --message-error-bg: #fdecef; color-scheme: light;
  }
}
.theme-toggle { display: none !important; }
body { font-family: var(--font-family-primary); }
#header { border-bottom: 1px solid var(--hairline-color); padding: 14px 40px; position: relative; }
#header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, #00aaff, #c570e8, #ff0025); opacity: .55; }
#site-name a.admin-brand { display: inline-flex; align-items: center; gap: 16px; color: var(--header-branding-color); }
#site-name a.admin-brand span { font: 600 12px/1 Inter, sans-serif; letter-spacing: .04em; color: var(--body-quiet-color); padding-left: 16px; border-left: 1px solid var(--hairline-color); }
#user-tools { font-family: Inter, sans-serif; text-transform: none; letter-spacing: 0; font-size: 12px; }
#user-tools a, #logout-form button { border-bottom: 0; color: var(--header-link-color); }
#user-tools a:hover, #logout-form button:hover { color: var(--accent); text-decoration: none; }
h1, h2, #content h1, .module h2, .module caption { font-family: Montserrat, 'Segoe UI', sans-serif; }
#content h1 { font-weight: 700; color: #15181e; }
.module h2, .module caption, .inline-group h2 { background: var(--primary); letter-spacing: .02em; text-transform: none; font-weight: 600; }
div.breadcrumbs { font-family: Inter, sans-serif; }
.button, input[type=submit], input[type=button], .submit-row input, a.button { border-radius: 8px; }
#changelist-filter h2 { background: var(--primary); }
@media (max-width: 767px) { #header { padding: 12px 16px; } #site-name a.admin-brand span { display: none; } }
.module caption a, .module h2 a, .module caption, #nav-sidebar .module caption a { color: #fff; }
#logout-form button { text-transform: none; font-size: 12px; }
#content .module caption, #content .module caption a, #nav-sidebar .module caption, #nav-sidebar .module caption a, .app-list caption a { color: #fff !important; }
/* Szerokość i nagłówek jak w aplikacji: kolumna 1352 px z marginesem 48 px, nagłówek 86 px, logo 160 px (bez skoku przy przejściu do panelu). */
#header{min-height:86px;height:86px;box-sizing:border-box;padding:0 max(48px, calc((100% - 1256px) / 2));display:flex;align-items:center;justify-content:space-between}
#site-name a.admin-brand img{width:160px;height:auto}
div.breadcrumbs{padding-inline:max(48px, calc((100% - 1256px) / 2))}
.main{max-width:1352px;margin-inline:auto;padding-inline:48px;box-sizing:border-box}
#footer{padding-inline:48px}
@media (max-width: 767px){#header{height:auto;min-height:76px;padding:12px 20px}#site-name a.admin-brand img{width:140px}div.breadcrumbs{padding-inline:20px}.main{padding-inline:0}}
