/*
 * Echo Ru Net — admin theme.
 * Visual language from docs/design/mockup.html (architecture 3.5.3): white background,
 * black text, grey #888 for secondary, #eee hairlines, monospace 14px/1.6.
 * Only Django admin CSS variables and a few selectors are overridden; markup stays stock.
 * Exception: errors and destructive actions keep a muted red so they are not missed.
 */

@font-face {
  font-family: "Cousine";
  src: url("fonts/Cousine-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cousine";
  src: url("fonts/Cousine-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root,
html[data-theme="light"],
html[data-theme="dark"],
html[data-theme="auto"] {
  --echo-text: #000;
  --echo-muted: #888;
  --echo-line: #eee;
  --echo-soft: #fafafa;
  --echo-danger: #a33;
  --echo-font: "Liberation Mono", "Cousine", monospace;

  color-scheme: light;

  --primary: #000;
  --secondary: #000;
  --accent: #000;
  --primary-fg: #fff;

  --body-fg: var(--echo-text);
  --body-bg: #fff;
  --body-quiet-color: var(--echo-muted);
  --body-medium-color: var(--echo-text);
  --body-loud-color: var(--echo-text);

  --header-color: var(--echo-muted);
  --header-branding-color: var(--echo-text);
  --header-bg: #fff;
  --header-link-color: var(--echo-muted);

  --breadcrumbs-fg: var(--echo-muted);
  --breadcrumbs-link-fg: var(--echo-muted);
  --breadcrumbs-bg: #fff;

  --link-fg: var(--echo-muted);
  --link-hover-color: var(--echo-text);
  --link-selected-fg: var(--echo-text);

  --hairline-color: var(--echo-line);
  --border-color: #ccc;

  --error-fg: var(--echo-danger);

  --message-success-bg: var(--echo-soft);
  --message-warning-bg: var(--echo-soft);
  --message-error-bg: #fff5f5;

  --darkened-bg: var(--echo-soft);
  --selected-bg: var(--echo-line);
  --selected-row: #f5f5f5;

  --button-fg: #fff;
  --button-bg: var(--echo-text);
  --button-hover-bg: var(--echo-muted);
  --default-button-bg: var(--echo-text);
  --default-button-hover-bg: var(--echo-muted);
  --close-button-bg: var(--echo-muted);
  --close-button-hover-bg: var(--echo-text);
  --delete-button-bg: var(--echo-danger);
  --delete-button-hover-bg: #822;

  --object-tools-fg: #fff;
  --object-tools-bg: var(--echo-text);
  --object-tools-hover-bg: var(--echo-muted);

  --font-family-primary: var(--echo-font);
  --font-family-monospace: var(--echo-font);
}

/* --- base text --- */
body {
  font: 14px/1.6 var(--echo-font);
  color: var(--echo-text);
}
a:link, a:visited { transition: color .15s; }
a:focus, a:hover { text-decoration: none; }
h1, h2, h3, #content h1 { font-weight: 700; color: var(--echo-text); }
#content h1 { font-size: 18px; margin-bottom: 32px; }

/* --- header: like the site header in the mockup --- */
#header {
  padding: 32px 64px 24px;
  border-bottom: 1px solid var(--echo-line);
  align-items: flex-start;
}
#site-name { font-size: 14px; font-weight: 700; line-height: 1.4; }
#site-name a:link, #site-name a:visited { color: var(--echo-text); }
#site-name a:hover { color: var(--echo-muted); }
#site-name .echo-subtitle { display: block; font-weight: 400; font-size: 13px; color: var(--echo-muted); }
#user-tools, #logout-form button {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--echo-muted);
}
#user-tools strong { color: var(--echo-text); }
#user-tools a, #logout-form button { border-bottom: 0; }
#header a:focus, #header a:hover, #logout-form button:hover { color: var(--echo-text); text-decoration: none; }

/* --- breadcrumbs: plain grey line --- */
div.breadcrumbs {
  padding: 12px 64px;
  font-size: 12px;
  border-bottom: 1px solid var(--echo-line);
}
div.breadcrumbs a { color: var(--echo-muted); }
div.breadcrumbs a:hover { color: var(--echo-text); }

/* --- content spacing --- */
#content { padding: 32px 64px 96px; }

/* --- modules: bold black caption instead of coloured bar --- */
.module h2, .module caption, .inline-group h2 {
  background: none;
  color: var(--echo-text);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--echo-text);
}
.module h2 a, .module caption a { color: var(--echo-text); }
.module { background: none; }
fieldset.module { border-top: 0; }

/* --- tables --- */
thead th, tfoot td, thead th a:link, thead th a:visited {
  background: #fff;
  color: var(--echo-muted);
  font-weight: 400;
  text-transform: none;
}
td, th { border-bottom: 1px solid var(--echo-line); }
tr:nth-child(even), .row-form-errors { background: #fff; }

/* --- buttons and inputs: square, monochrome --- */
.button, input[type=submit], input[type=button], .submit-row input, a.button,
.object-tools a:link, .object-tools a:visited {
  border-radius: 0;
  font-family: var(--echo-font);
}
.object-tools a:link, .object-tools a:visited { text-transform: none; letter-spacing: 0; }
input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], input[type=tel], textarea, select, .vTextField {
  border-radius: 0;
  border-color: #ccc;
  font-family: var(--echo-font);
}
input:focus, textarea:focus, select:focus { border-color: var(--echo-text); }

/* --- messages: thin left rule, no coloured icons --- */
ul.messagelist li {
  background-image: none;
  padding-left: 16px;
  border-left: 2px solid var(--echo-text);
  color: var(--echo-text);
}
ul.messagelist li.error { border-left-color: var(--echo-danger); }

/* --- sidebar --- */
#nav-sidebar .current-model { background: var(--selected-row); }
#nav-filter { border-radius: 0; }

/* --- login page --- */
.login { background: #fff; }
.login #container { border: 0; border-radius: 0; margin: 15vh auto 0; }
.login #header { padding: 0 20px 16px; border-bottom: 0; justify-content: flex-start; }
.login #content { padding: 0 20px; }
.login .submit-row { text-align: left; }

/* --- the theme is light only (mockup) --- */
.theme-toggle { display: none !important; }

@media (max-width: 767px) {
  #header { padding: 20px; }
  div.breadcrumbs { padding: 10px 20px; }
  #content { padding: 20px; }
}

