:root {
    --green: #159447;
    --green-dark: #087338;
    --green-deep: #07552d;
    --red: #ee282c;
    --ink: #15221a;
    --muted: #647169;
    --line: #dfe7e1;
    --surface: #ffffff;
    --soft: #f3f7f3;
    --shadow: 0 18px 48px rgba(28, 70, 43, 0.10);
    --font-body: 'Segoe UI', Arial, sans-serif;
    --font-heading: 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--font-body); background: #f7faf7; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 1.2em; height: 1.2em; display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(21, 148, 71, .28); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.public-page { min-height: 100vh; overflow-x: hidden; background: linear-gradient(150deg, #f9fbf8 0%, #eff6ef 52%, #f9fbf8 100%); position: relative; }
.background-shape { position: fixed; border-radius: 50%; filter: blur(1px); pointer-events: none; z-index: 0; }
.background-shape-one { width: 520px; height: 520px; right: -180px; top: -250px; background: radial-gradient(circle, rgba(21,148,71,.12), rgba(21,148,71,0) 68%); }
.background-shape-two { width: 420px; height: 420px; left: -220px; bottom: -180px; background: radial-gradient(circle, rgba(238,40,44,.06), rgba(238,40,44,0) 70%); }

.site-header { position: relative; z-index: 2; width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: 102px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 190px; height: auto; display: block; }
.admin-link { display: inline-flex; align-items: center; gap: 8px; color: #536159; text-decoration: none; font-size: .9rem; font-weight: 600; padding: 10px 14px; border-radius: 12px; transition: .2s ease; }
.admin-link:hover { color: var(--green-dark); background: rgba(255,255,255,.75); }

.portal-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 8px 0 70px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 410px); grid-template-rows: auto auto; column-gap: 64px; row-gap: 4px; align-items: end; max-width: none; margin-bottom: 22px; }
.eyebrow, .section-kicker { color: var(--green-dark); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; margin: 0 0 14px; }
.hero .eyebrow { grid-column: 1; grid-row: 1; margin-bottom: 2px; font-size: .68rem; }
.hero h1 { grid-column: 1; grid-row: 2; font-family: var(--font-heading); font-size: clamp(1.95rem, 3vw, 2.6rem); line-height: 1.1; letter-spacing: -.045em; margin: 0; font-weight: 800; }
.hero h1 span { color: var(--green); }
.hero p { grid-column: 2; grid-row: 2; max-width: 410px; color: var(--muted); line-height: 1.55; font-size: .88rem; margin: 0 0 3px; }

.apps-section { background: rgba(255,255,255,.76); border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); border-radius: 28px; padding: 28px; backdrop-filter: blur(12px); }
.apps-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.apps-heading h2, .admin-card h2 { font-family: var(--font-heading); font-size: 1.5rem; margin: 0; letter-spacing: -.03em; }
.apps-heading .section-kicker { margin-bottom: 6px; }
.search-box { width: min(100%, 320px); height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 13px; background: var(--soft); border: 1px solid transparent; border-radius: 13px; color: #6c776f; transition: .2s; }
.search-box:focus-within { background: #fff; border-color: rgba(21,148,71,.45); box-shadow: 0 0 0 4px rgba(21,148,71,.08); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box kbd { font: 600 .72rem var(--font-body); background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; }
.apps-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.app-card { position: relative; min-width: 0; min-height: 190px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 17px 12px 14px; text-align: center; background: #fff; border: 1px solid #e8eee9; border-radius: 17px; text-decoration: none; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; overflow: hidden; }
.app-card::before { content: ''; position: absolute; inset: auto 0 0; height: 3px; background: var(--app-color); transform: scaleX(0); transform-origin: left; transition: transform .22s ease; }
.app-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--app-color) 32%, white); box-shadow: 0 14px 30px rgba(26, 66, 38, .11); }
.app-card:hover::before { transform: scaleX(1); }
.app-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; color: var(--app-color); background: color-mix(in srgb, var(--app-color) 11%, white); border-radius: 13px; }
.app-icon svg { width: 24px; height: 24px; stroke-width: 1.9; }
.app-copy { width: 100%; min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.app-copy strong { font-family: var(--font-heading); font-size: .87rem; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.app-copy > span { color: var(--muted); font-size: .7rem; line-height: 1.35; overflow-wrap: anywhere; }
.app-copy > .app-access { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin-top: auto; padding: 4px 7px; border-radius: 999px; font-size: .6rem; font-weight: 800; line-height: 1.2; }
.app-access svg { width: 13px; height: 13px; flex: 0 0 auto; stroke-width: 2.2; }
.app-copy > .app-access-public { color: #087338; background: #e8f6ec; }
.app-copy > .app-access-company { color: #8a5a06; background: #fff3d9; }
.app-arrow { position: absolute; top: 10px; right: 10px; color: #9ba69f; opacity: .42; transition: .2s; }
.app-card:hover .app-arrow { color: var(--app-color); opacity: 1; transform: translate(2px, -2px); }
.empty-state { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty-state svg { margin: 0 auto 14px; width: 34px; height: 34px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0; }
.site-footer { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 30px; color: #7b877f; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .8rem; }
.footer-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }

.login-page { min-height: 100vh; background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, .9fr) 1.1fr; }
.login-brand-panel { position: relative; overflow: hidden; padding: 48px clamp(38px, 6vw, 90px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: linear-gradient(155deg, #08753a 0%, #07552d 100%); }
.login-brand-panel::before, .login-brand-panel::after { content: ''; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); }
.login-brand-panel::before { width: 540px; height: 540px; right: -320px; top: -180px; }
.login-brand-panel::after { width: 380px; height: 380px; right: -220px; top: -90px; }
.brand-light { position: relative; z-index: 1; width: fit-content; background: white; border-radius: 14px; padding: 10px 15px; }
.brand-light img { width: 172px; }
.login-brand-panel > div { position: relative; z-index: 1; max-width: 520px; }
.eyebrow-light { color: #9ce7b8; }
.login-brand-panel h1 { font: 800 clamp(2.2rem, 4.5vw, 4.7rem)/1.04 var(--font-heading); letter-spacing: -.055em; margin: 0; }
.login-brand-panel p { color: rgba(255,255,255,.74); font-size: 1.03rem; line-height: 1.7; }
.login-brand-footer { position: relative; z-index: 1; font-size: .8rem !important; margin: 0; }
.login-form-panel { display: grid; place-items: center; padding: 48px 28px; background: #fbfdfb; }
.login-card { width: min(100%, 430px); }
.login-card .back-link { margin-bottom: 66px; }
.mobile-logo { display: none; }
.login-card h2 { font: 800 2.25rem/1.1 var(--font-heading); letter-spacing: -.04em; margin: 0 0 8px; }
.login-card > p { color: var(--muted); margin: 0 0 30px; }

.form-field { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.form-field > span:first-child, .icon-fieldset legend { font-size: .84rem; font-weight: 700; color: #37443b; }
.form-field input, .form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 13px 14px; outline: 0; color: var(--ink); transition: .2s; }
.form-field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.form-field input:focus, .form-field textarea:focus, .input-wrap:focus-within { border-color: rgba(21,148,71,.6); box-shadow: 0 0 0 4px rgba(21,148,71,.08); }
.form-field small { color: #829087; font-size: .74rem; }
.input-wrap { display: flex; align-items: center; gap: 10px; min-height: 50px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 13px; transition: .2s; color: #87938b; cursor: text; }
.input-wrap input { border: 0; box-shadow: none !important; padding: 0; min-width: 0; min-height: 34px; flex: 1; font-size: 1.05rem; line-height: 1.8; cursor: text; caret-color: var(--green); }
.input-wrap input::placeholder { color: #a0aaa3; font-size: .9rem; opacity: 1; }
.password-toggle { border: 0; background: transparent; color: #758078; padding: 7px; cursor: pointer; border-radius: 8px; }
.back-link { width: fit-content; display: inline-flex; align-items: center; gap: 7px; color: #5e6b63; text-decoration: none; font-weight: 600; font-size: .84rem; }
.back-link:hover { color: var(--green-dark); }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 10px 17px; text-decoration: none; font-weight: 700; font-size: .86rem; cursor: pointer; transition: .2s; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 8px 20px rgba(21,148,71,.2); }
.button-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.button-secondary { color: #445048; background: #fff; border-color: var(--line); }
.button-secondary:hover { border-color: #b9c7bd; background: var(--soft); }
.button-full { width: 100%; margin-top: 26px; min-height: 50px; }

.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin: 18px 0; border-radius: 11px; font-size: .83rem; line-height: 1.5; }
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert-success { color: #126c36; background: #e9f7ed; border: 1px solid #c9e9d3; }
.alert-error { color: #a92a2e; background: #fff0f0; border: 1px solid #f6cecf; }
.alert-line { display: block; }

.admin-page { min-height: 100vh; background: #f4f7f4; }
.admin-header { position: sticky; top: 0; z-index: 20; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(28px, calc((100vw - 1180px) / 2)); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.admin-brand { gap: 16px; }
.admin-brand img { width: 145px; }
.admin-brand > span { padding-left: 16px; border-left: 1px solid var(--line); color: #6b776f; font-size: .82rem; font-weight: 700; }
.admin-nav { display: flex; align-items: center; gap: 12px; }
.admin-nav > a { display: inline-flex; align-items: center; gap: 7px; color: #5a675f; text-decoration: none; font-size: .82rem; font-weight: 600; padding: 8px 10px; border-radius: 9px; }
.admin-nav > a:hover { background: var(--soft); color: var(--green-dark); }
.admin-user { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; padding: 0 9px 0 4px; }
.user-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #e5f4e9; color: var(--green-dark); }
.admin-nav form, .row-actions form, .order-controls form { margin: 0; }
.icon-button { width: 37px; height: 37px; display: inline-grid; place-items: center; padding: 0; color: #607067; background: transparent; border: 1px solid transparent; border-radius: 10px; cursor: pointer; text-decoration: none; transition: .18s; }
.icon-button:hover { color: var(--green-dark); background: #eef6f0; border-color: #dceade; }
.icon-button-danger:hover { color: #c52b31; background: #fff0f0; border-color: #f7d1d2; }
.icon-button-small { width: 27px; height: 27px; border-radius: 7px; }
.icon-button:disabled { opacity: .25; cursor: default; background: transparent; border-color: transparent; }

.admin-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 80px; }
.admin-main-narrow { width: min(850px, calc(100% - 48px)); }
.admin-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.admin-title-row h1 { font: 800 clamp(2rem, 4vw, 3rem)/1.1 var(--font-heading); letter-spacing: -.045em; margin: 0 0 8px; }
.admin-title-row > div > p:last-child { color: var(--muted); margin: 0; }
.admin-title-row .section-kicker { margin-bottom: 8px; }
.form-title-row { margin-top: 26px; }
.admin-card, .form-card { background: #fff; border: 1px solid #e1e8e3; border-radius: 20px; box-shadow: 0 10px 30px rgba(28, 70, 43, .055); }
.admin-card-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid #e7ece8; }
.admin-card-header p { color: var(--muted); font-size: .8rem; margin: 4px 0 0; }
.table-wrap { overflow-x: auto; }
.systems-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.systems-table th { color: #738078; background: #fbfcfb; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; text-align: left; padding: 12px 18px; border-bottom: 1px solid #e7ece8; }
.systems-table th:nth-child(1) { width: 90px; text-align: center; }
.systems-table th:nth-child(2) { width: 34%; }
.systems-table th:nth-child(4) { width: 105px; }
.systems-table th:nth-child(5) { width: 150px; }
.systems-table td { padding: 15px 18px; border-bottom: 1px solid #edf1ee; vertical-align: middle; }
.systems-table tbody tr:last-child td { border-bottom: 0; }
.systems-table tbody tr:hover { background: #fbfdfb; }
.order-controls, .row-actions { display: flex; align-items: center; justify-content: center; gap: 3px; }
.order-controls > span { color: #7c8880; font-size: .75rem; min-width: 18px; text-align: center; }
.system-cell { display: flex; align-items: center; gap: 13px; min-width: 0; }
.table-icon { width: 43px; height: 43px; flex: 0 0 auto; display: grid; place-items: center; color: var(--app-color); background: color-mix(in srgb, var(--app-color) 11%, white); border-radius: 12px; }
.table-icon svg { width: 21px; height: 21px; }
.system-cell > span:last-child { min-width: 0; }
.system-cell strong, .system-cell small { display: block; }
.system-cell strong { font-size: .86rem; margin-bottom: 3px; }
.system-cell small { color: var(--muted); font-size: .72rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.url-text { display: block; color: #6c7970; font-size: .72rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.status-badge { width: fit-content; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 99px; font-size: .7rem; font-weight: 700; }
.status-badge > span { width: 6px; height: 6px; border-radius: 50%; }
.status-active { color: #16733b; background: #eaf7ee; }
.status-active > span { background: #24a955; }
.status-hidden { color: #6e7771; background: #eef1ef; }
.status-hidden > span { background: #8a958e; }
.admin-empty { text-align: center; padding: 65px 20px; color: var(--muted); }
.admin-empty svg { width: 36px; height: 36px; margin: 0 auto 13px; }
.admin-empty h3 { color: var(--ink); margin: 0 0 7px; }
.admin-empty p { margin: 0; }

.system-form { display: flex; flex-direction: column; gap: 20px; }
.form-card { padding: 28px; }
.form-card-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 28px; }
.heading-icon { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; color: var(--green-dark); background: #eaf5ed; border-radius: 11px; }
.form-card-heading h2 { font: 700 1.05rem var(--font-heading); margin: 0 0 5px; }
.form-card-heading p { color: var(--muted); font-size: .78rem; margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .form-field { margin: 0; }
.form-field-wide { grid-column: 1 / -1; }
.access-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.access-fieldset legend { margin-bottom: 10px; color: #37443b; font-size: .84rem; font-weight: 700; }
.access-scope-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.access-scope-option { cursor: pointer; }
.access-scope-option input { position: absolute; opacity: 0; pointer-events: none; }
.access-scope-card { min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 14px; color: #68756c; background: #f8faf8; border: 1px solid #e1e8e3; border-radius: 13px; transition: .18s; }
.access-scope-card > svg { width: 24px; height: 24px; flex: 0 0 auto; }
.access-scope-card > span { display: flex; flex-direction: column; gap: 3px; }
.access-scope-card strong { color: #26342b; font-size: .82rem; }
.access-scope-card small { color: var(--muted); font-size: .72rem; line-height: 1.35; }
.access-scope-option:hover .access-scope-card { border-color: #b9d4c0; background: #f3f8f4; }
.access-scope-option input:focus-visible + .access-scope-card { outline: 3px solid rgba(21,148,71,.25); outline-offset: 2px; }
.access-scope-option input:checked + .access-scope-card { color: var(--green-dark); background: #edf8f0; border-color: var(--green); box-shadow: 0 6px 16px rgba(21,148,71,.1); }
.icon-fieldset { border: 0; padding: 0; margin: 0; }
.icon-fieldset legend { margin-bottom: 11px; }
.icon-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.icon-option { cursor: pointer; }
.icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.icon-option > span:first-of-type { height: 52px; display: grid; place-items: center; color: #68756c; background: #f5f7f5; border: 1px solid #e5eae6; border-radius: 12px; transition: .18s; }
.icon-option:hover > span:first-of-type { color: var(--green-dark); border-color: #bdd8c5; }
.icon-option input:focus-visible + span { outline: 3px solid rgba(21,148,71,.25); outline-offset: 2px; }
.icon-option input:checked + span { color: #fff; background: var(--green); border-color: var(--green); box-shadow: 0 7px 16px rgba(21,148,71,.2); }
.color-field { max-width: 300px; }
.color-control { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .76rem; }
.color-control input { width: 48px; height: 39px; flex: 0 0 auto; padding: 3px; cursor: pointer; }
.switch-field { margin-top: 25px; padding-top: 24px; border-top: 1px solid #e7ece8; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; cursor: pointer; }
.switch-field > span:first-child { display: flex; flex-direction: column; gap: 4px; }
.switch-field strong { font-size: .86rem; }
.switch-field small { color: var(--muted); font-size: .75rem; }
.switch-field input { position: absolute; opacity: 0; }
.switch { position: relative; width: 45px; height: 25px; border-radius: 99px; background: #c8d0ca; transition: .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .2s; }
.switch-field input:checked + .switch { background: var(--green); }
.switch-field input:checked + .switch::after { transform: translateX(20px); }
.switch-field input:focus-visible + .switch { outline: 3px solid rgba(21,148,71,.25); outline-offset: 2px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 1200px) {
    .apps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .hero { display: block; max-width: 720px; margin-bottom: 24px; }
    .hero .eyebrow { display: block; margin-bottom: 7px; }
    .hero h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); }
    .hero p { max-width: 560px; margin-top: 9px; }
    .apps-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: 1fr 1.2fr; }
    .login-brand-panel { padding: 38px; }
    .systems-table th:nth-child(3), .systems-table td:nth-child(3) { display: none; }
}

@media (max-width: 720px) {
    .site-header, .portal-shell, .site-footer, .admin-main { width: min(100% - 28px, 1180px); }
    .site-header { min-height: 82px; }
    .brand img { width: 148px; }
    .admin-link span { display: none; }
    .portal-shell { padding-top: 6px; }
    .hero { margin-bottom: 20px; }
    .hero h1 { font-size: clamp(1.7rem, 7.4vw, 2rem); line-height: 1.08; }
    .hero p { font-size: .84rem; line-height: 1.5; margin-top: 8px; }
    .apps-section { padding: 22px 16px; border-radius: 22px; }
    .apps-heading { align-items: stretch; flex-direction: column; gap: 18px; }
    .search-box { width: 100%; }
    .apps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-card { min-height: 184px; }
    .site-footer { flex-wrap: wrap; }

    .login-shell { display: block; }
    .login-brand-panel { display: none; }
    .login-form-panel { min-height: 100vh; padding: 32px 22px; }
    .login-card .back-link { margin-bottom: 38px; }
    .mobile-logo { display: block; margin-bottom: 38px; }
    .mobile-logo img { width: 170px; }

    .admin-header { height: 68px; padding: 0 14px; }
    .admin-brand img { width: 122px; }
    .admin-brand > span, .admin-nav > a span, .admin-user > span:last-child { display: none; }
    .admin-nav { gap: 3px; }
    .admin-title-row { align-items: stretch; flex-direction: column; }
    .admin-title-row .button { align-self: flex-start; }
    .admin-main { padding-top: 38px; }
    .admin-card { background: transparent; border: 0; box-shadow: none; }
    .admin-card-header { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; }
    .systems-table, .systems-table tbody { display: block; }
    .systems-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .systems-table tr { display: grid; grid-template-columns: 1fr auto; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 10px; }
    .systems-table td { display: block; border: 0; padding: 0; }
    .systems-table td:nth-child(1) { grid-row: 2; }
    .systems-table td:nth-child(2) { grid-column: 1 / -1; }
    .systems-table td:nth-child(3) { display: none; }
    .systems-table td:nth-child(4) { grid-row: 2; }
    .systems-table td:nth-child(5) { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 10px; }
    .systems-table td::before { display: none; }
    .order-controls { justify-content: flex-start; }
    .row-actions { justify-content: flex-end; }
    .form-card { padding: 21px 17px; }
    .form-grid { grid-template-columns: 1fr; }
    .access-scope-picker { grid-template-columns: 1fr; }
    .icon-picker { grid-template-columns: repeat(4, 1fr); }
    .form-actions { position: sticky; bottom: 0; padding: 12px 0; background: rgba(244,247,244,.92); backdrop-filter: blur(8px); }
    .form-actions .button { flex: 1; }
}

@media (max-width: 480px) {
    .apps-grid { grid-template-columns: 1fr; }
    .app-card { min-height: 132px; display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 13px; padding: 15px 16px; text-align: left; }
    .app-copy { align-items: flex-start; }
    .app-copy > .app-access { justify-content: flex-start; margin-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
