/* Login and account pages — A (animated gradient) / B (city image).
   Colors are computed on the server (Helpers/LoginAppearance.cs): --brand, --action, --action-light, --action-mid, --action-dark.
   No color-mix (older Android browsers). On phones the login button is visible without scrolling. */

html, body.dn-body { margin: 0; height: 100%; }
body.dn-body { background: #f4f6fb; }
.dn {
  --bg: #f4f6fb; --surface: #fff; --field: #f5f7fa; --text: #18202c; --text-2: #5b6576; --line: #dde2ea;
  --edevlet: #d6213a; --error: #c42b1c; --error-bg: #fdecea; --success: #138a52; --success-bg: #e5f6ed; --focus: #ffbf47;
  --card-shadow: 0 1px 2px rgba(20,30,50,.06), 0 12px 40px rgba(20,30,50,.12);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  min-height: 100vh; min-height: 100dvh; position: relative; overflow-x: hidden;
}
.dn *, .dn *::before, .dn *::after { box-sizing: border-box; }
.dn a { color: var(--action); font-weight: 600; }
.dn a:hover { color: var(--action-dark); }
.dn :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.dn h1 { font-size: 1.55em; line-height: 1.2; margin: 0 0 4px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }

/* ---------- Shell ---------- */
.dn-a { display: flex; flex-direction: column; }
.dn-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; position: relative; z-index: 3; }
.dn-brand { display: flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none !important; min-width: 0; }
.dn-brand b { display: block; font-size: 1.02em; line-height: 1.15; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-brand small { display: block; font-size: .78em; color: var(--text-2); font-weight: 600; }
.dn-brand.light { color: #fff !important; }
.dn-brand.light small { color: rgba(255,255,255,.85); }
.dn-logo { width: auto; max-width: 140px; height: 40px; object-fit: contain; flex: none; }
.dn-logo-fallback { display: none; width: 40px; height: 40px; border-radius: 12px; place-items: center; background: var(--action); color: #fff; font-weight: 800; flex: none; }
.dn-brand.light .dn-logo-fallback { background: rgba(255,255,255,.2); border: 1.5px solid #fff; }
/* Logo on top of an image/photo (most logos have dark text) stays readable on a light backing */
.dn-brand.light .dn-logo { background: rgba(255,255,255,.92); border-radius: 12px; padding: 4px 9px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.dn-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 16px 10px; position: relative; z-index: 2; min-height: 0; }
.dn-card { width: 100%; max-width: 410px; background: var(--surface); border-radius: 26px; box-shadow: var(--card-shadow); padding: 26px 26px 18px; position: relative; }
.dn-wide .dn-card { max-width: 980px; }
.dn-footer { display: flex; justify-content: center; gap: 10px; font-size: .78em; padding: 6px 10px 12px; color: var(--text-2); position: relative; z-index: 2; }
.dn-lead { color: var(--text-2); margin: 0 0 16px; font-size: .95em; }
/* The application being signed in to: its image + name at the top of the card */
.dn-client { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--field); width: fit-content; max-width: 100%; }
.dn-client > span:last-child { min-width: 0; line-height: 1.2; }
.dn-client small { display: block; font-size: .7em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); }
.dn-client > span:last-child b { display: block; font-size: .92em; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-client-icon { position: relative; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--action); color: #fff; flex: none; overflow: hidden; font-size: .8em; }
.dn-client-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; }
/* Desktop: the application being signed in to is more prominent (full width, brand tint, larger image and name) */
@media (min-width: 901px) and (min-height: 601px) {
  .dn-client { width: 100%; gap: 14px; padding: 10px 14px 10px 10px; margin-bottom: 18px; border: 1.5px solid var(--action-mid); background: var(--action-light); border-radius: 16px; }
  .dn-client-icon { width: 48px; height: 48px; border-radius: 13px; font-size: 1em; box-shadow: 0 2px 8px rgba(20,30,50,.12); }
  .dn-client-icon img { padding: 4px; }
  .dn-client small { font-size: .72em; color: var(--action-dark); }
  .dn-client > span:last-child b { font-size: 1.12em; color: var(--text); }
}

/* ---------- A: animated gradient ---------- */
.dn-aurora { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.dn-aurora span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: dn-drift 18s ease-in-out infinite alternate; }
.dn-aurora span:nth-child(1) { width: 55%; height: 60%; left: -12%; top: -15%; background: var(--brand); }
.dn-aurora span:nth-child(2) { width: 45%; height: 50%; right: -10%; top: 5%; background: var(--blob2); animation-delay: -6s; }
.dn-aurora span:nth-child(3) { width: 50%; height: 45%; left: 25%; bottom: -20%; background: var(--blob3); opacity: .4; animation-delay: -12s; }
@keyframes dn-drift { to { transform: translate(8%, 6%) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .dn-aurora span { animation: none; } }

/* ---------- B: city image ---------- */
.dn-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.15fr 1fr; }
.dn-image-pane { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; background: var(--action-dark); }
.dn-image-pane .dn-city { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.dn-image-pane::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(5,15,35,.45), rgba(5,15,35,.05) 55%, transparent); }
.dn-image-pane.has-photo::before { background: linear-gradient(180deg, rgba(5,15,35,.62), rgba(5,15,35,.28) 55%, rgba(5,15,35,.12)); }
.dn-image-pane > .dn-header, .dn-image-pane > .dn-image-text { z-index: 2; }
.dn-image-pane .dn-header { background: linear-gradient(180deg, rgba(0,0,0,.18), transparent); }
.dn-image-text { position: relative; padding: 10px 40px; max-width: 540px; }
.dn-image-text h2 { font-size: 2.3em; line-height: 1.1; margin: 0 0 10px; font-weight: 800; letter-spacing: -.02em; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.dn-image-text p { margin: 0; font-size: 1.05em; opacity: .95; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
/* Photo attribution (CC BY-SA): bottom-right corner of the image pane, in the footer on account pages */
.dn-image-pane .dn-credit { position: absolute; right: 10px; bottom: 8px; z-index: 2; font-size: 11px; font-weight: 500; color: rgba(255,255,255,.85) !important; text-decoration: none; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.dn-image-pane .dn-credit:hover { color: #fff !important; text-decoration: underline; }
.dn .dn-footer .dn-credit { color: var(--text-2); font-weight: 500; }
.dn-form-pane { display: flex; flex-direction: column; background: var(--surface); min-height: 0; }
.dn-form-pane .dn-center { padding: 0 30px; }
.dn-form-pane .dn-card { box-shadow: none; padding: 0; border-radius: 0; background: transparent; }
.dn-b.dn-wide .dn-split { grid-template-columns: .7fr 1.3fr; }

/* ---------- Form ---------- */
.dn-button { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 50px; border-radius: 15px; border: 0; font: inherit; font-weight: 700; font-size: 1.02em; cursor: pointer; text-decoration: none !important; transition: transform .1s, filter .15s; }
.dn-button svg { width: 18px; height: 18px; }
.dn-button:active { transform: scale(.985); }
.dn-primary { background: var(--action); color: #fff !important; box-shadow: 0 6px 18px rgba(20,30,50,.18); }
.dn-primary:hover { filter: brightness(1.08); }
.dn-edevlet { background: var(--surface); color: var(--text) !important; border: 2px solid #eb9aa6; justify-content: flex-start; padding: 0 14px; height: 54px; }
.dn-edevlet:hover { background: #fdf3f4; }
.dn-edevlet-logo { width: 30px; height: 30px; border-radius: 9px; background: var(--edevlet); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.dn-edevlet small { margin-left: auto; font-size: .72em; font-weight: 700; color: var(--success); background: var(--success-bg); padding: 3px 8px; border-radius: 99px; }
/* Google sign-in button (Google's own colours stay on the logo only) */
.dn-google { background: var(--surface); color: var(--text) !important; border: 1px solid var(--line); justify-content: flex-start; padding: 0 14px; }
.dn-google:hover { border-color: var(--text-2); }
.dn-button svg.dn-google-logo { width: 22px; height: 22px; margin: 0 4px; flex: none; }
form:has(.dn-edevlet) + form .dn-google { margin-top: 10px; }
.dn-divider { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .8em; margin: 14px 0; font-weight: 600; }
.dn-divider::before, .dn-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dn-float { position: relative; margin-bottom: 12px; }
.dn-float input { width: 100%; height: 54px; padding: 22px 46px 6px 15px; border: 1.5px solid var(--line); border-radius: 15px; background: var(--field); font: inherit; font-size: 1.02em; color: var(--text); transition: border-color .15s, background .15s; }
.dn-float input:focus { outline: 0; border-color: var(--action); background: var(--surface); box-shadow: 0 0 0 4px var(--action-light); }
.dn-float label { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; transition: all .15s; font-size: .98em; margin: 0; font-weight: 500; }
.dn-float input:focus + label, .dn-float input:not(:placeholder-shown) + label { top: 16px; font-size: .74em; font-weight: 700; color: var(--action); }
/* Browser autofill of saved passwords: :placeholder-shown stays true until the user touches the page, so the label would overlap the value.
   Separate rules: a browser that does not know one pseudo-class drops the whole selector list. */
.dn-float input:-webkit-autofill + label { top: 16px; font-size: .74em; font-weight: 700; color: var(--action); }
.dn-float input:autofill + label { top: 16px; font-size: .74em; font-weight: 700; color: var(--action); }
.dn-field-action { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--text-2); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.dn-field-action svg { width: 20px; height: 20px; }
.dn-field-action:hover, .dn-field-action.shown { background: var(--action-light); color: var(--action); }
.dn-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 14px; font-size: .88em; }
.dn-switch { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); font-weight: 600; margin: 0; }
.dn-switch input { appearance: none; -webkit-appearance: none; width: 36px; height: 21px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; margin: 0; transition: background .15s; flex: none; }
.dn-switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.dn-switch input:checked { background: var(--action); }
.dn-switch input:checked::after { left: 18px; }
.dn-footnote { text-align: center; font-size: .86em; color: var(--text-2); margin-top: 12px; }
.dn-small { font-size: .84em; color: var(--text-2); }
.dn-protected { text-align: center; font-size: .68em; color: var(--text-2); margin-top: 8px; opacity: .85; }
.dn-segment { display: grid; grid-template-columns: 1fr 1fr; background: var(--field); border-radius: 14px; padding: 4px; margin: 0 0 14px; border: 1px solid var(--line); }
.dn-segment button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .88em; padding: 9px 6px; border-radius: 11px; cursor: pointer; color: var(--text-2); }
.dn-segment button.active { background: var(--surface); color: var(--action); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.dn-captcha { margin: 0 0 12px; min-height: 78px; }
.dn-info { background: var(--action-light); color: var(--action-dark); border-radius: 12px; padding: 10px 12px; font-size: .9em; }
form[hidden] { display: none !important; }

/* Validation summary (_ValidationSummary) → error band */
.dn-errors .validation-summary-valid, .dn-errors .validation-summary-valid * { display: none; }
.dn-errors .alert, .dn-errors .validation-summary-errors { background: var(--error-bg); color: var(--error); border: 0; border-radius: 12px; padding: 8px 12px; font-size: .86em; font-weight: 700; margin: -4px 0 12px; }
.dn-errors ul { margin: 0; padding-left: 18px; }
.dn-errors strong { display: none; }

/* ---------- Inner pages (password reset, two-factor …) with their previous markup inside the card ---------- */
.dn-card .container { max-width: none; padding: 0; }
.dn-card .tab-content { position: static !important; width: 100% !important; left: auto !important; top: auto !important; transform: none !important; background: transparent; box-shadow: none; border-radius: 0; padding: 0; margin: 0; min-height: 0; }
.dn-card .card, .dn-card .login-page, .dn-card .content { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; width: auto !important; position: static !important; height: auto; }
/* Bootstrap grid indentation (col-md-*) collapses to a single column inside the card */
.dn-card .row { margin-left: 0; margin-right: 0; }
.dn-card .form-group > [class*="col-"], .dn-card .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; padding-left: 0; padding-right: 0; }
/* Keep the global footer rule of the old page CSS (fixed, light blue) away from the footer strip */
.dn .dn-footer { position: relative; left: auto; bottom: auto; width: auto; background: none; opacity: 1; }
.dn-card h1, .dn-card h2, .dn-card h3 { font-weight: 800; letter-spacing: -.01em; color: var(--text); }
.dn-card h2, .dn-card h3 { font-size: 1.25em; }
.dn-card h4 { font-size: 1em; font-weight: 600; color: var(--text-2); margin-bottom: 12px; }
.dn-card .form-control { height: 50px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); font: inherit; color: var(--text); }
.dn-card .form-control:focus { border-color: var(--action); background: var(--surface); box-shadow: 0 0 0 4px var(--action-light); }
.dn-card .btn { border-radius: 14px; font-weight: 700; padding: .6rem 1.1rem; }
.dn-card .btn-primary { background: var(--action); border-color: var(--action); color: #fff; }
.dn-card .btn-primary:hover, .dn-card .btn-primary:focus { background: var(--action-dark); border-color: var(--action-dark); }
.dn-card .btn-outline-primary, .dn-card .btn-outline-info { color: var(--action); border-color: var(--action-mid); }
.dn-card .nav-pills .nav-link.active { background: var(--action); }
.dn-card .g-recaptcha { max-width: 100%; }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .dn-split { grid-template-columns: 1fr !important; grid-template-rows: auto 1fr; }
  .dn-image-pane { height: 150px; flex: none; }
  /* Staff form with many options (e-Devlet + corporate/local tabs): the image strip shrinks so the form fits without scrolling */
  .dn-b:has(.dn-segment) .dn-image-pane { height: 96px; }
  .dn-image-text { padding: 0 20px; }
  .dn-image-text h2 { font-size: 1.45em; margin: 0; }
  .dn-image-text p { display: none; }
  .dn-form-pane { border-radius: 26px 26px 0 0; margin-top: -26px; position: relative; z-index: 3; }
  /* The form pane overlaps the bottom 26px of the image strip: keep the photo credit above it */
  .dn-image-pane .dn-credit { bottom: 32px; font-size: 10px; }
  .dn-form-pane .dn-center { padding: 20px 18px 0; align-items: flex-start; }
}
@media (max-width: 520px) {
  .dn-header { padding: 10px 14px; }
  .dn-center { padding: 0 10px 6px; align-items: flex-start; }
  .dn-a .dn-center { padding-top: 4px; }
  .dn-card { padding: 18px 16px 12px; border-radius: 22px; }
  .dn-form-pane .dn-card { padding: 0; }
  .dn-form-pane .dn-center { padding: 16px 16px 0; }
  .dn-image-text { display: none; }
  .dn h1 { font-size: 1.3em; }
  .dn-lead { margin-bottom: 12px; }
  .dn-footer { display: none; }
  /* reCAPTCHA is a fixed 304px: scale it down on narrow screens */
  .dn-captcha { transform: scale(.88); transform-origin: 0 0; min-height: 70px; }
}
@media (max-height: 600px) {
  .dn-client { margin-bottom: 8px; padding: 4px 10px 4px 4px; }
  .dn-client-icon { width: 28px; height: 28px; }
  .dn-client small { display: none; }
  .dn-image-pane { height: 96px; }
  .dn-image-text h2 { font-size: 1.15em; }
  .dn-button { height: 46px; }
  .dn-edevlet { height: 48px; }
  .dn-float input { height: 50px; }
  .dn-divider { margin: 10px 0; }
  .dn-lead { display: none; }
}

/* Cookie notice (cookieconsent, appended to body — .dn variables do not reach it): small card that does not cover the form */
.dn-body .cc-window.cc-banner {
  left: 12px; right: auto; bottom: 12px; max-width: 360px; padding: 10px 12px; gap: 10px;
  border-radius: 12px; background: #18202c; color: #fff; box-shadow: 0 8px 24px rgba(16, 24, 40, .25);
  font: 500 12.5px/1.45 'Plus Jakarta Sans', system-ui, sans-serif; flex-direction: row; align-items: center;
}
.dn-body .cc-window .cc-message { margin: 0; }
.dn-body .cc-window .cc-compliance { flex: none; }
.dn-body .cc-window .cc-btn { border: 0; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; background: #fff; color: #18202c; min-width: 0; }
@media (max-width: 520px) {
  .dn-body .cc-window.cc-banner { right: 12px; max-width: none; }
  /* While the notice is open on phones, keep it off the login button: reserve space at the bottom (removed when dismissed) */
  .dn-body:has(> .cc-window:not(.cc-invisible)) .dn { padding-bottom: 76px; }
}

/* ---------- Footer strip: Powered by + OpenID link ---------- */
.dn-footer { align-items: center; flex-wrap: wrap; }
.dn-powered { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dn-powered img { height: 15px; width: auto; display: block; }
.dn-b:not(.dn-account) .dn-form-pane .dn-powered img, .dn-a .dn-powered img { opacity: .9; }
.dn .dn-footer-link { color: var(--text-2); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Account pages: home, Manage, Grants, sign-out ---------- */
.dn-account { display: flex; flex-direction: column; }
.dn-account .dn-header { gap: 12px; }
.dn-banner { position: absolute; left: 0; right: 0; top: 0; height: 150px; overflow: hidden; z-index: 0; background: var(--action-dark); }
.dn-banner .dn-city { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.dn-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,15,35,.55), rgba(5,15,35,.25)); }
.dn-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dn-user-name { font-weight: 700; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.dn .dn-signout { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 12px; background: var(--surface); color: var(--text) !important; box-shadow: 0 2px 8px rgba(20,30,50,.10); text-decoration: none !important; font-weight: 700; font-size: .88em; flex: none; }
.dn .dn-signout:hover { color: var(--error) !important; }
.dn-signout svg { width: 17px; height: 17px; }
.dn-b .dn-user-name { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.dn-b .dn-signout { background: rgba(255,255,255,.18); color: #fff !important; border: 1px solid rgba(255,255,255,.5); box-shadow: none; }
.dn-account-main { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 4px 20px 22px; position: relative; z-index: 2; }
.dn .dn-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 10px 4px; font-size: .9em; text-decoration: none; }
.dn-back svg { width: 17px; height: 17px; }
.dn-b .dn-back { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.dn-page { background: var(--surface); border-radius: 22px; box-shadow: var(--card-shadow); padding: 26px 28px; }
/* Narrow pages narrow the content column; the "Hesabım" link aligns with the card */
.dn-account-main:has(> .dn-narrow) { max-width: 500px; }
.dn-account-main:has(> .dn-medium) { max-width: 720px; }
.dn-account-main:has(> .dn-page:not(.dn-narrow):not(.dn-medium)) { max-width: 820px; }
.dn-centered { text-align: center; }
.dn-icon-lg { width: 56px; height: 56px; border-radius: 18px; display: inline-grid; place-items: center; background: var(--action-light); color: var(--action); margin-bottom: 12px; }
.dn-icon-lg svg { width: 26px; height: 26px; }
.dn-mt { margin-top: 10px; }
.dn-subheading { font-size: .78em !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2) !important; margin: 18px 2px 10px; }

/* Home page */
.dn-greeting { background: var(--surface); border-radius: 22px; box-shadow: var(--card-shadow); padding: 16px 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.dn-avatar { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 1.1em; color: #fff; background: linear-gradient(135deg, var(--action), var(--blob2)); flex: none; }
.dn-greeting h1 { font-size: 1.3em; margin: 0; }
.dn-greeting p { margin: 0; font-size: .86em; color: var(--text-2); }
/* Account list on the left, applications as a two-column grid on the right (administrators can have 20+ applications) */
.dn-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 0 18px; align-items: start; }
.dn .dn-section-title { font-size: .78em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); margin: 4px 6px 8px; }
.dn-b .dn-columns .dn-section-title { text-shadow: none; }
.dn-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.dn .dn-app { display: flex; align-items: center; gap: 11px; background: var(--surface); border-radius: 16px; box-shadow: var(--card-shadow); padding: 10px 12px; color: var(--text); text-decoration: none; font-weight: 500; }
.dn a.dn-app:hover { color: var(--text); box-shadow: 0 0 0 2px var(--action-mid), var(--card-shadow); }
.dn-app > svg { width: 17px; height: 17px; color: var(--text-2); margin-left: auto; flex: none; }
.dn-app-icon { position: relative; width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--action); color: #fff; flex: none; overflow: hidden; }
.dn-app-icon b { font-size: .85em; font-weight: 800; }
.dn-app-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; border: 1px solid var(--line); border-radius: 13px; }
.dn-app-name { min-width: 0; }
.dn-app-name b { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-app-name small, .dn-list small { display: block; font-size: .8em; color: var(--text-2); font-weight: 500; }
.dn-list { background: var(--surface); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden; }
.dn .dn-list a { display: flex; align-items: center; gap: 13px; padding: 13px 16px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
.dn .dn-list a:last-child { border-bottom: 0; }
.dn .dn-list a:hover { background: var(--field); color: var(--text); }
.dn-list a > svg, .dn-trailing svg { width: 17px; height: 17px; color: var(--text-2); margin-left: auto; flex: none; }
.dn-trailing { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .85em; font-weight: 700; }
.dn .dn-list a.dn-list-signout { color: var(--error); }
.dn-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dn-icon svg { width: 18px; height: 18px; }
.dn-icon.tone-1 { background: #fdf0e1; color: #b45309; }
.dn-icon.tone-2 { background: #e0f3f1; color: #0f766e; }
.dn-icon.tone-3 { background: #fdeee6; color: #c2410c; }
.dn-icon.tone-4 { background: #efe9fd; color: #6d28d9; }
.dn-icon.tone-5 { background: #e3f5e9; color: #15803d; }
.dn-icon.tone-6 { background: #eef1f5; color: #5b6576; }
.dn-icon.tone-7 { background: #fdecea; color: #c42b1c; }
.dn-empty { background: var(--surface); border: 1.5px dashed var(--line); border-radius: 18px; padding: 18px; color: var(--text-2); font-size: .9em; text-align: center; margin-bottom: 18px; }
.dn-page .dn-empty { box-shadow: none; }

/* Grants */
.dn-grant { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.dn-grant-body { flex: 1; min-width: 0; }
.dn-grant-body > b { display: block; font-weight: 700; }
.dn-grant-body > small { display: block; color: var(--text-2); font-size: .82em; }
.dn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dn-chips span { background: var(--field); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: .78em; font-weight: 600; color: var(--text-2); }

/* Button variants, boxes, status bands */
.dn-secondary { background: var(--surface); color: var(--action) !important; border: 1.5px solid var(--action-mid); }
.dn-secondary:hover { background: var(--action-light); }
.dn-danger { background: var(--surface); color: var(--error) !important; border: 1.5px solid #efb4ad; }
.dn-danger:hover { background: var(--error-bg); }
.dn-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.dn-actions .dn-button, .dn-actions form, .dn-box .dn-button, .dn-grant .dn-button { width: auto; height: 44px; padding: 0 18px; font-size: .92em; }
.dn-actions form { padding: 0; height: auto; }
.dn-box { display: flex; align-items: center; gap: 14px; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.dn-box > div { flex: 1; min-width: 0; }
.dn-box b { display: block; font-weight: 700; }
.dn-box small { display: block; color: var(--text-2); font-size: .84em; }
.dn-box form { margin: 0; flex: none; }
.dn-box.danger { border-color: #f3c6c0; background: #fffafa; }
.dn-box.success { border-color: #b7e2c8; background: #f6fcf8; }
.dn-status { background: var(--success-bg); color: var(--success); border-radius: 12px; padding: 10px 14px; font-size: .9em; font-weight: 600; margin: 0 0 14px; }
.dn-status.error { background: var(--error-bg); color: var(--error); }
.dn-status.warning { background: #fff4dc; color: #8a5300; }
.dn-status a { color: inherit; text-decoration: underline; }

/* Forms */
.dn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.dn-grid .dn-full { grid-column: 1 / -1; }
.dn-float input:disabled { opacity: .75; cursor: not-allowed; }
.dn-account .dn-field-action { top: 27px; }
.dn-field-error { display: block; color: var(--error); font-size: .8em; font-weight: 600; margin: 4px 4px 0; }
.dn-field-error:empty { display: none; }
.dn .dn-link-button { border: 0; background: none; padding: 4px; font: inherit; font-size: .82em; font-weight: 700; color: var(--action); cursor: pointer; text-decoration: underline; }
.dn-page form > .dn-button { margin-top: 4px; }

/* Account sub-pages not rewritten yet (authenticator setup, recovery codes …): Bootstrap markup inside a card */
.dn-account-main:not(:has(> .dn-page, > .dn-greeting)) { flex: none; max-width: 720px; background: var(--surface); border-radius: 22px; box-shadow: var(--card-shadow); padding: 22px 26px; margin: 0 auto 22px; }
.dn-account-main h3, .dn-account-main h4 { font-weight: 800; color: var(--text); }
.dn-account-main .form-control { height: 48px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--field); font: inherit; color: var(--text); }
.dn-account-main .form-control:focus { border-color: var(--action); background: var(--surface); box-shadow: 0 0 0 4px var(--action-light); }
.dn-account-main .btn { border-radius: 14px; font-weight: 700; padding: .6rem 1.1rem; }
.dn-account-main .btn-primary { background: var(--action); border-color: var(--action); color: #fff; }
.dn-account-main .btn-primary:hover { background: var(--action-dark); border-color: var(--action-dark); }
.dn-account-main .alert { border-radius: 12px; border: 0; }

@media (max-width: 760px) {
  .dn-columns, .dn-grid { grid-template-columns: 1fr; }
  .dn-columns .dn-list { margin-bottom: 18px; }
}
@media (max-width: 520px) {
  .dn-account .dn-footer { display: flex; }
  .dn-user-name { display: none; }
  .dn-account-main { padding: 2px 10px 14px; }
  .dn-page { padding: 18px 16px; border-radius: 20px; }
  .dn-greeting { padding: 12px 14px; border-radius: 18px; }
  .dn-avatar { width: 44px; height: 44px; border-radius: 14px; }
  .dn-grant { flex-wrap: wrap; }
  .dn-grant form { width: 100%; padding-left: 56px; }
  .dn-box { flex-wrap: wrap; }
  .dn-box form, .dn-box > .dn-button { margin-left: 50px; }
  .dn-banner { height: 140px; }
  .dn-apps { grid-template-columns: 1fr; }
}
