/* VisaPortal visual refresh: responsive Admin and Applicant workspaces.
   This file changes presentation only; application and database workflows remain in PHP. */
:root {
  --vp-navy: #102b52;
  --vp-navy-deep: #0b1f3d;
  --vp-blue: #2864e8;
  --vp-blue-deep: #1b4fc0;
  --vp-ink: #14243d;
  --vp-muted: #65748b;
  --vp-line: #e2e8f1;
  --vp-bg: #f3f6fb;
  --vp-card: #ffffff;
  --vp-green-bg: #e7f7ee;
  --vp-green: #14784f;
  --vp-yellow-bg: #fff4d6;
  --vp-yellow: #92600c;
  --vp-red-bg: #ffebed;
  --vp-red: #b52f3e;
  --vp-info-bg: #eaf2ff;
  --vp-info: #245bb3;
  --vp-shadow: 0 10px 30px rgba(18, 43, 79, .065);
}

html { min-width: 320px; scroll-behavior: smooth; }
body { color: var(--vp-ink); font-size: 15px; line-height: 1.55; overflow-x: hidden; }
body, button, input, select, textarea { -webkit-font-smoothing: antialiased; }
.app-shell { min-height: 100vh; background: var(--vp-bg); }
.main-wrap { min-width: 0; margin-left: 264px; }
.sidebar { width: 264px; padding: 26px 17px 18px; background: linear-gradient(180deg, #102f59 0%, #0b2141 100%); box-shadow: 8px 0 28px rgba(8, 29, 58, .08); }
.sidebar .brand { padding: 2px 8px 23px; }
.brand strong { font-size: 19px; letter-spacing: -.55px; }
.brand small { font-size: 9px; letter-spacing: 1.35px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; font-size: 21px; }
.sidebar-profile { padding: 22px 8px 20px; gap: 12px; }
.sidebar-profile strong { font-size: 13px; font-weight: 800; line-height: 1.35; }
.sidebar-profile small { font-size: 11px; }
.nav-caption { padding: 6px 10px 11px; font-size: 10px; font-weight: 800; letter-spacing: 1.55px; }
.side-nav { gap: 5px; padding: 0 1px; }
.nav-link { min-height: 45px; padding: 11px 13px; border-radius: 11px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.nav-icon { width: 19px; flex: 0 0 19px; font-size: 16px; }
.nav-link.active { background: linear-gradient(110deg, #3475d1, #2861b0); box-shadow: 0 8px 18px rgba(2, 17, 42, .22); }
.sidebar-foot { font-size: 10px; line-height: 1.7; }

.topbar { height: 72px; padding: 0 clamp(20px, 3vw, 42px); background: rgba(255,255,255,.97); border-bottom-color: #e6ebf3; box-shadow: 0 3px 12px rgba(25, 49, 84, .025); }
.breadcrumb { font-size: 13px; font-weight: 600; gap: 12px; }
.breadcrumb strong { font-weight: 800; }
.topbar-right { gap: 20px; }
.topbar-date { font-size: 12px; }
.topbar-user { font-size: 12px; font-weight: 800; }
.content { width: 100%; max-width: 1680px; padding: 34px clamp(20px, 3vw, 46px) 54px; }
.page-heading { align-items: center; margin-bottom: 27px; gap: 22px; }
.page-heading h1 { font-size: clamp(25px, 2.1vw, 34px); line-height: 1.18; letter-spacing: -.9px; font-weight: 800; }
.page-heading p { max-width: 850px; font-size: 14px; line-height: 1.65; }
.eyebrow { font-size: 11px; letter-spacing: 1.55px; font-weight: 800; }

/* Cards, panels and metric blocks */
.panel, .stat-card, .form-card { border: 1px solid #e3e9f2; border-radius: 17px; box-shadow: var(--vp-shadow); background: var(--vp-card); }
.panel { margin-bottom: 21px; }
.panel-head { padding: 21px 24px; gap: 16px; border-bottom: 1px solid #edf1f6; }
.panel-head h2, .panel-head h3 { font-size: 16px; line-height: 1.35; font-weight: 800; color: #17375f; }
.panel-head p { margin-top: 6px; font-size: 12px; line-height: 1.55; }
.panel-body { padding: 23px 24px; min-width: 0; }
.panel-body.flush { padding: 0; }
.stats-grid { gap: 17px; margin-bottom: 23px; }
.stat-card { min-width: 0; padding: 20px 21px; border-radius: 16px; }
.stat-card .label { font-size: 11px; font-weight: 800; letter-spacing: .55px; line-height: 1.4; }
.stat-card .value { font-size: 32px; font-weight: 800; letter-spacing: -1.2px; }
.stat-card .sub { font-size: 11px; line-height: 1.45; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 19px; }
.grid-2 { gap: 20px; margin-bottom: 21px; }

/* Buttons and status colours */
.btn { min-height: 43px; padding: 11px 17px; border-radius: 10px; font-size: 12px; font-weight: 800; letter-spacing: .1px; box-shadow: 0 7px 15px rgba(40,100,232,.16); }
.btn:hover { background: var(--vp-blue-deep); }
.btn-outline { color: #285ba7; border: 1px solid #cbd8eb; box-shadow: none; background: #fff; }
.btn-soft { color: #245bb3; background: var(--vp-info-bg); box-shadow: none; }
.btn-danger { color: var(--vp-red); background: var(--vp-red-bg); box-shadow: none; }
.btn-sm { min-height: 36px; padding: 8px 12px; font-size: 11px; }
.status-badge { min-height: 27px; padding: 6px 11px; border-radius: 999px; font-size: 11px; line-height: 1.25; font-weight: 800; white-space: normal; overflow-wrap: anywhere; }
.status-badge.success { background: var(--vp-green-bg); color: var(--vp-green); border: 1px solid #c9edd9; }
.status-badge.warning { background: var(--vp-yellow-bg); color: var(--vp-yellow); border: 1px solid #f5e2a7; }
.status-badge.danger { background: var(--vp-red-bg); color: var(--vp-red); border: 1px solid #f6cbd0; }
.status-badge.info { background: var(--vp-info-bg); color: var(--vp-info); border: 1px solid #d5e4ff; }
.status-badge.muted { background: #f0f3f7; color: #67758b; border: 1px solid #e1e6ed; }

/* Form controls: prevent collision, overflow and oversized checkbox behaviour. */
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; gap: 8px; }
.field label { color: #344760; font-size: 12px; line-height: 1.4; font-weight: 800; }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea, .filter-input {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  color: #1b2f4c; background: #fff; border: 1px solid #d8e1ed;
  border-radius: 11px; outline: none; font-size: 14px; line-height: 1.4;
  box-shadow: inset 0 1px 2px rgba(20,40,70,.025); transition: border-color .16s, box-shadow .16s, background .16s;
}
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-input:focus {
  border-color: #6d9bef; box-shadow: 0 0 0 4px rgba(40,100,232,.11); background: #fff;
}
.field input::placeholder, .field textarea::placeholder, .filter-input::placeholder { color: #9ba8ba; }
.field .hint, .hint, .note { color: #718199; font-size: 11px; line-height: 1.65; }
.form-section { padding: 26px 0; }
.section-title { margin-bottom: 19px; font-size: 15px; font-weight: 800; }
.section-title span { width: 31px; height: 31px; font-size: 12px; }
.form-actions { flex-wrap: wrap; gap: 10px; }
.filter-bar { padding: 17px 21px; gap: 11px; }
.filter-bar .filter-input { min-height: 42px; max-width: 320px; font-size: 13px; }
.filter-bar select { min-height: 42px; padding: 9px 12px; border-radius: 9px; font-size: 12px; }

/* Admin requirement editor: checkbox controls stay together and readable. */
.requirement-editor { gap: 15px; }
.requirement-row { padding: 19px 60px 19px 19px; border-radius: 15px; background: #f9fbfe; border-color: #dfe7f1; }
.requirement-grid { display: grid; grid-template-columns: minmax(170px,1.15fr) minmax(180px,1.3fr) minmax(145px,.85fr) minmax(170px,1.15fr); gap: 15px; align-items: end; }
.check-field { grid-column: 1 / -1 !important; display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
.check-field label { display: flex !important; align-items: center !important; justify-content: flex-start; gap: 10px !important; min-width: 0; min-height: 46px; margin: 0; padding: 10px 13px; border: 1px solid #dce5f1; border-radius: 10px; background: #fff; color: #40536e; font-size: 12px !important; font-weight: 700 !important; line-height: 1.35; }
.check-field input[type="checkbox"], .check-field input[type="radio"], .field input[type="checkbox"], .field input[type="radio"] {
  appearance: auto; -webkit-appearance: auto; display: inline-block; flex: 0 0 18px; width: 18px !important; min-width: 18px; max-width: 18px; height: 18px !important; min-height: 18px !important; margin: 0; padding: 0; accent-color: var(--vp-blue); box-shadow: none; border: 0;
}
.remove-requirement { top: 13px; right: 13px; min-height: 34px; padding: 7px 10px; border-radius: 9px; font-size: 11px; font-weight: 800; }
.case-module-block { padding: 24px 0; }
.case-module-block h3 { font-size: 17px; margin-bottom: 18px; }
.case-save-bar { border-radius: 16px; padding: 18px 22px; }
.case-save-bar strong { font-size: 16px; }
.case-save-bar small { font-size: 12px; }

/* Details, documents and service cards */
.detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; min-width: 0; }
.detail-item { min-width: 0; padding: 15px 0; }
.detail-item small { display: block !important; margin: 0 0 7px !important; font-size: 11px; line-height: 1.4; color: #7c8ba1; }
.detail-item strong { display: block !important; max-width: 100%; font-size: 14px; line-height: 1.5; font-weight: 750; white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.detail-full { grid-column: 1 / -1; }
.case-status-grid { gap: 14px; padding: 22px 24px; }
.case-status-tile { min-width: 0; padding: 16px 17px; border-radius: 13px; }
.case-status-tile span { font-size: 12px; line-height: 1.4; }
.case-status-tile strong { font-size: 14px; line-height: 1.45; }
.requirement-status-list { gap: 13px; }
.requirement-status-item, .service-status-item { align-items: center; min-width: 0; gap: 15px; padding: 15px 0; }
.requirement-status-item > div, .service-status-item > div { flex: 1 1 auto; min-width: 0; }
.requirement-status-item strong, .service-status-item strong { font-size: 14px; font-weight: 800; line-height: 1.45; }
.requirement-status-item small, .service-status-item small { font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.document-requirement-card { min-width: 0; padding: 19px; border-radius: 14px; }
.document-req-main { min-width: 0; align-items: flex-start; }
.document-req-main > div { min-width: 0; flex: 1 1 auto; }
.document-req-main strong { font-size: 14px; font-weight: 800; line-height: 1.4; }
.document-req-main p { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.document-req-main small { font-size: 11px; }
.document-admin-note { font-size: 12px; line-height: 1.6; }
.service-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card { min-width: 0; padding: 20px; border-radius: 15px; background: #fbfdff; }
.service-card h3 { font-size: 15px; line-height: 1.4; font-weight: 800; }
.service-card p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.profile-hero-card { padding: 25px 28px; border-radius: 18px; gap: 22px; }
.profile-hero-photo, .profile-photo-preview { flex: 0 0 auto; width: 92px; height: 112px; object-fit: cover; object-position: center; border-radius: 14px; }
.profile-hero-copy h2 { font-size: 25px; font-weight: 800; line-height: 1.25; }
.profile-hero-copy p { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.profile-ref-chip { font-size: 12px; font-weight: 800; }
.profile-detail-layout { grid-template-columns: 112px minmax(0,1fr); gap: 25px; }
.profile-detail-photo, .profile-detail-photo-placeholder { width: 112px; height: 136px; object-fit: cover; object-position: center; border-radius: 14px; }

/* Tables and alerts */
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 0 0 15px 15px; }
.table-wrap table { min-width: 720px; }
th { padding: 15px 17px; font-size: 10px; font-weight: 800; letter-spacing: .85px; }
td { padding: 15px 17px; font-size: 12px; line-height: 1.55; }
.alert { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin: 0 0 20px; padding: 14px 17px; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; }
.alert.success { background: var(--vp-green-bg); border: 1px solid #c7ead7; color: var(--vp-green); }
.alert.error { background: var(--vp-red-bg); border: 1px solid #f2c8cd; color: var(--vp-red); }
.alert.warning { background: var(--vp-yellow-bg); border: 1px solid #f0dfac; color: var(--vp-yellow); }
.alert.info { background: var(--vp-info-bg); border: 1px solid #d4e3ff; color: var(--vp-info); }
.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 120; width: min(420px, calc(100vw - 32px)); display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.toast { width: 100%; max-width: none; padding: 15px 18px; border-radius: 13px; font-size: 13px; font-weight: 750; line-height: 1.5; box-shadow: 0 12px 34px rgba(8,30,59,.2); overflow-wrap: anywhere; }
.toast.error { background: #a92938; }
.toast.success { background: #14784f; }

/* Login screens: same authentication flow, stronger consistent presentation. */
.login-page { min-height: calc(100svh - 78px); grid-template-columns: minmax(0, 1.02fr) minmax(450px, .98fr); background: #f5f7fb; }
.login-art { padding: clamp(36px, 5vw, 72px); background: radial-gradient(circle at 85% 25%, rgba(76,139,232,.28), transparent 32%), linear-gradient(145deg, #0b2447 0%, #123b70 60%, #1d579b 100%); }
.login-art h1 { max-width: 570px; font-size: clamp(34px, 3vw, 48px); line-height: 1.13; letter-spacing: -1.5px; font-weight: 800; }
.login-art p { max-width: 470px; font-size: 15px; line-height: 1.8; }
.login-panel { padding: clamp(24px, 4vw, 60px); background: #f5f7fb; }
.login-box { width: min(100%, 490px); padding: clamp(25px, 3vw, 42px); border: 1px solid #e2e9f3; border-radius: 22px; background: #fff; box-shadow: 0 20px 55px rgba(17,43,79,.09); }
.login-logo { margin-bottom: 25px; }
.login-logo .brand-mark { width: 50px; height: 50px; border-radius: 15px; font-size: 24px; }
.login-box .eyebrow { margin-bottom: 9px; }
.login-box h2 { margin: 0 0 11px; font-size: clamp(25px, 2.2vw, 31px); line-height: 1.2; font-weight: 800; letter-spacing: -.75px; }
.login-box > p { margin: 0 0 23px; font-size: 14px; line-height: 1.65; }
.login-box .field { margin-bottom: 17px; }
.login-box .field label { font-size: 13px; }
.login-box .field input { min-height: 52px; font-size: 15px; }
.login-box .btn { width: 100%; min-height: 52px; margin-top: 7px; border-radius: 11px; font-size: 14px; }
.login-help { margin-top: 21px; color: #718099; font-size: 12px; line-height: 1.8; }
.login-help a { color: #245bb3; font-weight: 800; }

/* Public pages retain the same visual language. */
.public-header { min-height: 78px; padding-inline: clamp(18px, 5vw, 80px); }
.public-nav { gap: clamp(14px, 2vw, 28px); font-size: 13px; }
.public-main { min-width: 0; }

/* Tablet: give the page the full width and use an off-canvas navigation drawer. */
@media (max-width: 1080px) {
  .mobile-topbar { display: flex; min-height: 64px; padding: 0 20px; position: sticky; top: 0; z-index: 35; background: linear-gradient(100deg, #102f59, #174477); box-shadow: 0 5px 18px rgba(7,28,58,.15); }
  .mobile-topbar .brand { font-size: 14px; font-weight: 800; }
  .mobile-topbar .brand-mark { width: 36px; height: 36px; }
  .mobile-topbar .icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: rgba(255,255,255,.1); }
  .mobile-topbar .avatar { width: 36px; height: 36px; }
  .sidebar { width: min(320px, 86vw); transform: translateX(-105%); transition: transform .24s ease; z-index: 60; box-shadow: 16px 0 42px rgba(5,21,45,.28); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .topbar { position: sticky; top: 64px; z-index: 25; height: 56px; padding: 0 22px; }
  .content { padding: 28px clamp(18px, 3vw, 34px) 44px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .form-grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .requirement-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service-cards-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .case-status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .login-page { grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); }
  .login-art { padding: 35px; }
}

@media (max-width: 760px) {
  .mobile-topbar { min-height: 58px; padding: 0 13px; }
  .mobile-topbar .brand { gap: 8px; font-size: 12px; }
  .mobile-topbar .brand-mark { width: 33px; height: 33px; border-radius: 10px; font-size: 17px; }
  .topbar { top: 58px; height: 48px; padding: 0 15px; }
  .breadcrumb { gap: 7px; font-size: 11px; min-width: 0; }
  .topbar-user { font-size: 11px; }
  .content { padding: 21px 13px 34px; }
  .page-heading { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 20px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 13px; }
  .page-heading > .btn, .page-heading > a.btn { align-self: flex-start; }
  .panel { border-radius: 14px; margin-bottom: 16px; }
  .panel-head { align-items: flex-start; flex-wrap: wrap; padding: 17px 16px; }
  .panel-head h2, .panel-head h3 { font-size: 15px; }
  .panel-body { padding: 17px 16px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
  .stat-card { min-height: 112px; padding: 14px 13px; border-radius: 13px; }
  .stat-card .label { font-size: 10px; }
  .stat-card .value { font-size: 26px; }
  .stat-card .sub { font-size: 10px; }
  .stat-icon { width: 35px; height: 35px; border-radius: 11px; }
  .grid-2, .applicant-module-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .form-grid, .form-grid.cols-3, .requirement-grid { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .field.full { grid-column: auto; }
  .field label { font-size: 12px; }
  .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea, .filter-input { min-height: 47px; font-size: 14px; }
  .field textarea { min-height: 100px; }
  .filter-bar { padding: 13px; align-items: stretch; }
  .filter-bar .filter-input { width: 100%; max-width: none; }
  .filter-bar select { flex: 1 1 145px; min-width: 0; }
  .case-status-grid { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 15px; gap: 9px; }
  .case-status-tile { padding: 13px; }
  .case-status-tile span { font-size: 11px; }
  .case-status-tile strong { font-size: 13px; }
  .detail-grid, .detail-grid-wide { grid-template-columns: minmax(0,1fr); gap: 0; }
  .detail-item { padding: 13px 0; }
  .detail-item small { margin-bottom: 6px !important; font-size: 11px; }
  .detail-item strong { font-size: 13px; line-height: 1.55; }
  .profile-hero-card { align-items: center; padding: 17px; gap: 14px; border-radius: 15px; }
  .profile-hero-photo, .profile-photo-preview { width: 68px; height: 82px; border-radius: 11px; }
  .profile-hero-copy { min-width: 0; }
  .profile-hero-copy h2 { font-size: 18px; overflow-wrap: anywhere; }
  .profile-hero-copy p { font-size: 11px; }
  .profile-ref-chip { max-width: 100%; font-size: 10px; overflow-wrap: anywhere; }
  .profile-detail-layout { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .profile-detail-photo, .profile-detail-photo-placeholder { width: 84px; height: 104px; }
  .requirement-row { padding: 16px 15px 54px; }
  .check-field { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .check-field label { min-height: 43px; width: 100%; }
  .remove-requirement { top: auto; right: 14px; bottom: 12px; }
  .case-module-block { padding: 18px 0; }
  .case-module-block h3 { font-size: 16px; }
  .case-save-bar { position: static; flex-direction: column; align-items: stretch; gap: 13px; padding: 16px; margin: 17px 0 25px; }
  .case-save-bar .btn { width: 100%; }
  .service-cards-grid { grid-template-columns: minmax(0,1fr); }
  .service-card { padding: 16px; }
  .requirement-status-item, .service-status-item { align-items: flex-start; flex-direction: column; gap: 8px; }
  .document-req-main { flex-direction: column; gap: 10px; }
  .document-file-line { align-items: flex-start; flex-direction: column; }
  .table-wrap table { min-width: 720px; }
  .alert { padding: 12px 13px; font-size: 12px; }
  .toast-stack { left: 12px; right: 12px; bottom: 14px; width: auto; }
  .toast { font-size: 12px; }
  .login-page { display: flex; flex-direction: column; min-height: auto; }
  .login-art { display: flex; min-height: 245px; padding: 25px 22px; gap: 22px; }
  .login-art h1 { font-size: 25px; line-height: 1.18; margin: 12px 0 8px; }
  .login-art p { font-size: 12px; line-height: 1.6; margin: 0; }
  .login-art-bottom { display: none; }
  .login-panel { min-height: 0; padding: 20px 13px 34px; }
  .login-box { width: 100%; max-width: 520px; margin: 0 auto; padding: 24px 19px; border-radius: 17px; }
  .login-box h2 { font-size: 24px; }
  .login-box > p { font-size: 13px; margin-bottom: 19px; }
  .public-header { min-height: 64px; padding: 0 15px; }
  .public-menu-btn { display: block; }
  .public-nav { top: 64px; }
  .hero { grid-template-columns: minmax(0,1fr); padding: 42px 20px 33px; }
  .hero h1 { font-size: clamp(30px, 8vw, 38px); }
  .type-grid, .feature-grid, .steps-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 460px) {
  .content { padding-inline: 11px; }
  .stats-grid { grid-template-columns: minmax(0,1fr); }
  .stat-card { min-height: 96px; }
  .case-status-grid { grid-template-columns: minmax(0,1fr); }
  .progress-track { gap: 2px; }
  .progress-step small { font-size: 8px; }
  .profile-hero-card { align-items: flex-start; }
  .login-art { min-height: 225px; }
  .login-art h1 { font-size: 23px; }
  .type-grid, .feature-grid, .steps-grid { grid-template-columns: minmax(0,1fr); }
  .action-links, .form-actions { width: 100%; }
  .form-actions > .btn, .form-actions > button { flex: 1 1 100%; }
}

/* Drawer backdrop is toggled by app.js below 1080px. */
.sidebar-backdrop { display: none; }
@media (max-width: 1080px) {
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(5,18,39,.52); opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; }
  .sidebar-backdrop.visible { opacity: 1; visibility: visible; }
  body.nav-open { overflow: hidden; }
}
