/* Re-skin the Django admin to match the Ela Wonen CRM (Delfts Instrument) look.
   Loaded after admin base.css, so these custom-property overrides win. */
:root {
  --primary: #1F4FA6;            /* cobalt */
  --secondary: #1F305E;          /* deep cobalt (header, default buttons) */
  --accent: #1F4FA6;
  --primary-fg: #ffffff;
  --header-branding-color: #ffffff;
  --header-color: #cdd8ee;
  --link-fg: #1F4FA6;
  --link-hover-color: #183F86;
  --link-selected-fg: #183F86;
  --button-bg: #1F4FA6;
  --button-hover-bg: #183F86;
  --default-button-hover-bg: #16264a;
  --object-tools-bg: #1F305E;
  --object-tools-hover-bg: #16264a;
  --selected-row: #E3EAF6;
  --font-family-primary: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-family-monospace: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #5B8DEF;
    --secondary: #172A44;
    --accent: #5B8DEF;
    --link-fg: #7AA4F3;
    --link-hover-color: #9cb9f5;
    --link-selected-fg: #9cb9f5;
    --button-bg: #1F4FA6;
    --object-tools-bg: #172A44;
  }
}

/* Focused edit view: drop Django's app-list sidebar, centre + card the form */
#nav-sidebar, #toggle-nav-sidebar { display: none !important; }
.change-form #content-main, .change-list #content-main { max-width: 1120px; }
#content { padding-top: 20px; }
fieldset.module { border: 1px solid var(--hairline-color); border-radius: 10px; overflow: hidden; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(20,32,43,.04); }
fieldset.module > h2 { background: var(--wash, #E3EAF6); color: var(--secondary); font-size: 13px; padding: 10px 14px; }
.submit-row { border-radius: 10px; }
.object-tools { margin-top: 4px; }

/* polish */
#header { border-bottom: 3px solid var(--primary); }
#branding h1, #branding h1 a:link, #branding h1 a:visited { color: #fff; font-weight: 700; }
.module h2, .module caption, .inline-group h2 { text-transform: none; letter-spacing: 0; font-weight: 600; }
a.button, input[type=submit], input[type=button], .submit-row input, .button { border-radius: 6px; }
.object-tools a { border-radius: 6px; }
div.breadcrumbs { font-size: 12.5px; }
