/**
 * MachForm admin login page theme: Dark.
 * Picked from the admin theme setting. Loaded after login-base.css on the login-style pages, and by
 * includes/header.php on the admin pages for the page background and #main frame (css/admin/admin-base.css).
 */
:root {
  /* shared with the admin pages: the page, the #main frame (the sign-in card has the same) and the footer */
  --page-bg: #131519;
  --card-shadow: none; /* a shadow doesn't show on a dark background: the border edges the card instead */
  --card-border: 1px solid rgba(255, 255, 255, 0.32); /* login card and #main frame */
  --main-fill: #36383a; /* #main background of the matching admin theme, and the sign-in card's */
  --main-inset: 0px; /* added to #main's padding (css/admin/admin-base.css); a unit, as calc() needs one */
  --muted: rgba(243, 244, 246, 0.62); /* the footer's text */
  --accent: #60a5fa; /* the admin footer's link */

  /* the sign-in pages only */
  --panel: #1E2022; /* the admin header's colour: #header in css/themes/theme_dark.css */
  --panel-line: #ffc83d; /* the yellow under the admin header's current item */

  --text: #e5e7eb; /* the Dark admin inputs' text (--mf-panel-control-text) */
  --heading: #f1f2f4;
  --page-text: rgba(243, 244, 246, 0.68); /* the footer line on the page */
  --label: rgba(243, 244, 246, 0.68);
  --placeholder: rgba(243, 244, 246, 0.45);

  --chip: rgba(255, 255, 255, 0.08);
  --divider: rgba(255, 255, 255, 0.18);
  --field: #2b2d2f; /* the Dark admin inputs (--mf-panel-control-fill and -edge, css/themes/theme_dark.css) */
  --field-border: #c0c5cc;
  --autofill-bg: #2b2d2f;

  --link: #ffc83d; /* the Dark admin's links (--mf-action-blue-*, css/themes/theme_dark.css) */
  --link-hover: #ffd666;
  --focus: #ffc83d;

  --btn-bg: #4d7b15; /* bb_green (css/bb_buttons.css): its colour and shadow */
  --btn-bg-hover: #3f6511; /* darker than bb_green's hover, so the words keep 4.5:1 */
  --btn-text: #ffffff;
  --btn-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, .132), 0 .3px .9px 0 rgba(0, 0, 0, .108);

  --sso-bg: #2b2d2f;
  --sso-bg-hover: #3a3c3f;

  --error-bg: rgba(248, 113, 113, 0.1);
  --error-border: rgba(248, 113, 113, 0.35);
  --error-text: #fecaca;

  --success-bg: rgba(74, 222, 128, 0.1);
  --success-border: rgba(74, 222, 128, 0.35);
  --success-text: #bbf7d0;

  /* light enough for 4.5:1 on the card */
  --strength-weak: #fca5a5;
  --strength-fair: #fdba74;
  --strength-good: #facc15;
  --strength-strong: #4ade80;

  --qr-bg: #ffffff;

  --icon-email: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f4f6' stroke-opacity='0.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 7l9 6 9-6'/%3E%3C/svg%3E");
  --icon-user:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f4f6' stroke-opacity='0.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  --icon-lock:  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f4f6' stroke-opacity='0.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --icon-key:   url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f4f6' stroke-opacity='0.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='4.5'/%3E%3Cpath d='M10.7 12.3L21 2'/%3E%3Cpath d='M16 7l3 3'/%3E%3Cpath d='M19 4l2 2'/%3E%3C/svg%3E");
  --icon-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f3f4f6' stroke-opacity='0.6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

:root:has(body.mf-login) {
  color-scheme: dark;
}

/* keep autofilled fields on-theme instead of the browser's yellow/blue */
body.mf-login input:-webkit-autofill,
body.mf-login input:-webkit-autofill:hover,
body.mf-login input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--autofill-bg) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-out 0s;
}
body.mf-login input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--autofill-bg) inset, 0 0 0 1px var(--focus);
}
