:root {
  --primary: #a9ed61;
  --secondary: #171c18;
  --accent: #b9f36b;
  --header-bg: #0c0f0d;
  --header-color: #f4f7f2;
  --breadcrumbs-bg: #141815;
  --breadcrumbs-fg: #aeb7af;
  --body-bg: #0d100e;
  --body-fg: #e9eee9;
  --body-quiet-color: #8e998f;
  --body-loud-color: #fff;
  --darkened-bg: #171b18;
  --selected-bg: #222a22;
  --selected-row: #1b2519;
  --hairline-color: #2b322c;
  --border-color: #313832;
  --link-fg: #b9f36b;
  --link-hover-color: #d6ff9c;
  --button-bg: #a9ed61;
  --button-hover-bg: #c5ff7e;
  --default-button-bg: #a9ed61;
  --default-button-hover-bg: #c5ff7e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: radial-gradient(circle at 85% -10%, #26321e 0, transparent 28%), var(--body-bg); font-family: "DM Sans", sans-serif; }
#header { min-height: 76px; padding: 0 30px; border-bottom: 1px solid #252b26; display: flex; align-items: center; gap: 28px; box-shadow: 0 8px 30px #0003; }
#branding { flex: 1; }
.habitcore-brand { display: flex; align-items: center; gap: 13px; }
.habitcore-brand img { width: 48px; height: 48px; object-fit: cover; border-radius: 13px; box-shadow: 0 6px 22px #ff6d2c24; }
.habitcore-brand div { display: flex; flex-direction: column; }
.habitcore-brand strong { color: #f7faf5; font: 800 19px/1.1 "Manrope", sans-serif; letter-spacing: -.5px; }
.habitcore-brand span { color: #899289; font-size: 10px; margin-top: 4px; text-transform: uppercase; letter-spacing: .13em; }
#user-tools { font-size: 12px; letter-spacing: 0; text-transform: none; }
#user-tools a { border-bottom: 0; color: #b5bdb6; padding: 7px 9px; border-radius: 8px; }
#user-tools a:hover { color: var(--accent); background: #20251f; }
.volver-app { color: #10150d !important; background: var(--accent); border-radius: 10px; padding: 9px 13px; text-decoration: none; font-weight: 700; font-size: 12px; white-space: nowrap; }
.volver-app span { margin-left: 7px; }
div.breadcrumbs { padding: 13px 30px; border-bottom: 1px solid #252a26; font-size: 12px; }
#content { padding: 32px; }
#content h1 { font: 800 30px "Manrope", sans-serif; letter-spacing: -1px; color: #f4f7f2; margin-bottom: 24px; }
#content-main { float: none; }
.dashboard #content { width: min(1180px, calc(100% - 34px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 1fr); gap: 24px; align-items: start; }
.dashboard #content > h1 { grid-column: 1 / -1; }
.dashboard #content-main { width: auto; min-width: 0; }
.dashboard #content-related { float: none; width: auto; margin: 0; position: static; }
.dashboard #content-related .module { margin: 0; }
.module { border: 1px solid var(--border-color); border-radius: 15px; overflow: hidden; background: #141815; box-shadow: 0 16px 55px #0002; margin-bottom: 18px; }
.module caption, .inline-group h2 { padding: 14px 18px; background: #1a201b; color: #eaf0e7; font: 700 13px "Manrope", sans-serif; letter-spacing: .02em; }
.module caption a { color: inherit; }
.module table { border-collapse: collapse; }
.module td, .module th { padding: 13px 18px; border-bottom-color: #252b26; }
.module tr:last-child td, .module tr:last-child th { border-bottom: 0; }
.module tbody tr { transition: background .15s ease; }
.module tbody tr:hover { background: #1a201a; }
.module th a { color: #dfe6dc; font-weight: 600; }
.addlink, .changelink, .viewlink { color: var(--accent) !important; }
#changelist .actions, #changelist-filter { background: #141815; border-color: var(--border-color); }
#changelist-filter { border-radius: 14px; overflow: hidden; }
#changelist-filter h2 { background: #1b211c; }
#changelist table { border-radius: 12px; overflow: hidden; }
input, textarea, select, .vTextField { background: #0f1310 !important; border: 1px solid #384039 !important; color: #edf2eb !important; border-radius: 9px !important; padding: 9px 11px !important; }
input:focus, textarea:focus, select:focus { border-color: var(--accent) !important; outline: 3px solid #b9f36b18; }
.button, input[type=submit], input[type=button], .submit-row input, a.button { border-radius: 9px !important; padding: 11px 17px !important; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease; }
.submit-row { background: #171c18; border: 1px solid var(--border-color); border-radius: 13px; padding: 14px 16px; box-shadow: 0 12px 35px #0003; }
.submit-row input.default, .submit-row input[name="_save"] { background: #b9f36b !important; color: #10150c !important; border: 2px solid #b9f36b !important; box-shadow: 0 7px 20px #b9f36b24; }
.submit-row input.default:hover, .submit-row input[name="_save"]:hover { background: #d7ff9e !important; border-color: #d7ff9e !important; color: #080b06 !important; transform: translateY(-2px); box-shadow: 0 11px 28px #b9f36b3b; }
.submit-row input[name="_addanother"], .submit-row input[name="_continue"] { background: #303831 !important; color: #f5f8f3 !important; border: 2px solid #566158 !important; }
.submit-row input[name="_addanother"]:hover, .submit-row input[name="_continue"]:hover { background: #f0f5ed !important; color: #121612 !important; border-color: #f0f5ed !important; transform: translateY(-2px); box-shadow: 0 9px 24px #0005; }
.submit-row input:active { transform: translateY(0) scale(.98) !important; box-shadow: none !important; }
.submit-row input:focus-visible, .button:focus-visible, a.button:focus-visible { outline: 3px solid #ffad67 !important; outline-offset: 3px; }
.submit-row .deletelink { background: transparent !important; color: #ff9185 !important; border: 2px solid #743a36 !important; border-radius: 9px; padding: 9px 15px; transition: background-color .18s ease, color .18s ease, transform .18s ease; }
.submit-row .deletelink:hover { background: #d64235 !important; border-color: #ef5d50 !important; color: #fff !important; transform: translateY(-2px); }
.password-protegida { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #111612; border: 1px solid #354036; border-radius: 11px; max-width: 560px; }
.password-protegida p { margin: 0 !important; line-height: 1.5; }
.password-protegida p:first-child { color: #dfe8dc; }
.password-protegida p:first-child strong { color: #8f9a90; margin-right: 5px; }
.password-protegida .button { display: inline-flex; align-items: center; margin: 4px 0 0 !important; background: #303831 !important; color: #f7faf5 !important; border: 2px solid #59655b !important; text-decoration: none; }
.password-protegida .button:hover { background: #b9f36b !important; border-color: #b9f36b !important; color: #10150c !important; transform: translateY(-2px); box-shadow: 0 9px 24px #b9f36b2c; }
.object-tools a { background: #202720; color: var(--accent) !important; border: 1px solid #354035; border-radius: 9px; padding: 9px 13px; }
.object-tools a:hover { background: #293329; }
.login { background: radial-gradient(circle at 50% 0, #2c3b20, transparent 38%), #090b0a; }
.login #container { width: min(420px, calc(100% - 32px)); max-width: 420px; margin-inline: auto; border: 1px solid #313832; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 100px #0008; }
.login #header { justify-content: center; padding: 22px; }
.login #content { padding: 30px; }
.login .habitcore-brand { justify-content: center; }
.login .volver-app { display: none; }
.login .form-row { padding: 0 0 18px; }
.login .form-row label { display: block; margin-bottom: 7px; line-height: 1.35; }
.login .form-row input { width: 100%; min-height: 48px; font-size: 16px; }
.login .submit-row { padding: 0; margin: 2px 0 0; background: transparent; border: 0; box-shadow: none; }
.login .submit-row input[type="submit"] { width: 100%; min-height: 52px; margin: 0; display: block; background: var(--accent) !important; border: 2px solid var(--accent) !important; color: #10150c !important; font-size: 14px; cursor: pointer; box-shadow: 0 10px 26px #b9f36b24; }
.login .submit-row input[type="submit"]:hover { background: #d7ff9e !important; border-color: #d7ff9e !important; transform: translateY(-2px); box-shadow: 0 14px 32px #b9f36b35; }
.login .submit-row input[type="submit"]:active { transform: translateY(0) scale(.99); }
@media (max-width: 900px) { .dashboard #content { display: block; } .dashboard #content-related { margin-top: 22px; } }
@media (max-width: 767px) {
  #header { min-height: 68px; padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  #branding { min-width: 0; }
  #content { width: 100%; padding: 22px 16px; }
  #content h1 { font-size: clamp(24px, 8vw, 30px); overflow-wrap: anywhere; }
  .habitcore-brand span, .volver-app { display: none; }
  .habitcore-brand strong { font-size: 17px; }
  .habitcore-brand img { width: 42px; height: 42px; }
  #user-tools { width: 100%; padding: 8px 0 2px; line-height: 2; }
  div.breadcrumbs { padding-inline: 16px; overflow-x: auto; white-space: nowrap; }
  .dashboard #content { width: 100%; }
  .module { overflow-x: auto; }
  .module table { min-width: 100%; }
  .object-tools { float: none; margin: -10px 0 20px; padding: 0; }
  .object-tools li { float: none; display: block; }
  .object-tools a { display: block; text-align: center; }
  .submit-row { display: grid; gap: 9px; }
  .submit-row input, .submit-row a.deletelink { width: 100%; margin: 0 !important; text-align: center; }
  .login #header { min-height: auto; padding: 20px 16px; }
  .login #content { padding: 24px 20px; }
  .login .habitcore-brand span { display: block; }
  .login #footer { padding: 0; }
}
@media (max-width: 380px) {
  .login #container { width: calc(100% - 20px); border-radius: 16px; }
  .login #content { padding: 22px 14px; }
  .login .habitcore-brand { gap: 10px; }
  .login .habitcore-brand span { font-size: 9px; letter-spacing: .09em; }
}
