﻿@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/poppins/Poppins-Regular.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/poppins/Poppins-Medium.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/poppins/Poppins-SemiBold.woff2') format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 700 900; font-display: swap; src: url('/fonts/poppins/Poppins-Bold.woff2') format('woff2'); }

:root {
    color-scheme: light;
    --font-sans: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bg-body: #f5f6f8;
    --bg-surface: #fff;
    --bg-card: #fff;
    --bg-subtle: #f8f9fb;
    --surface-muted: #f0f2f5;
    --text-main: #18191b;
    --text-muted: #667085;
    --border: #d8dee8;
    --border-hover: #bcc5d1;
    --primary: #f36c21;
    --primary-hover: #e96118;
    --primary-light: #fff1e8;
    --primary-text: #fff;
    --link: #bb4c0e;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --success: #15803d;
    --success-bg: #effcf4;
    --success-border: #c3e9d0;
    --warning: #a16207;
    --warning-bg: #fff8e8;
    --warning-border: #f4dfac;
    --info: #0369a1;
    --info-bg: #eff8ff;
    --info-border: #c6e5f6;
    --focus: #5f646b;
    --ring: rgb(243 108 33 / .14);
    --shadow-sm: 0 1px 2px rgb(24 25 27 / .035), 0 12px 30px -26px rgb(24 25 27 / .26);
    --shadow-md: 0 12px 30px -20px rgb(24 25 27 / .22);
    --shadow-lg: 0 22px 56px -30px rgb(24 25 27 / .42);
    --radius-sm: 8px;
    --radius-control: 10px;
    --radius-card: 14px;
    --radius-modal: 16px;
    --ease: cubic-bezier(.2,.8,.2,1);
    --motion-fast: 160ms;
    --motion-normal: 240ms;
    --sidebar-width: 60px;
    /* Compatibility names already used by the existing Blade screens. */
    --accent-primary: var(--primary);
    --accent-success: var(--success);
    --accent-danger: var(--danger);
    --accent-warning: var(--warning);
    --border-color: var(--border);
    --card-bg: var(--bg-card);
    --card-bg-subtle: var(--bg-subtle);
    --input-disabled-bg: var(--surface-muted);
}
[data-theme='dark'] {
    color-scheme: dark;
    --bg-body: #0f1114;
    --bg-surface: #15181c;
    --bg-card: #15181c;
    --bg-subtle: #191c21;
    --surface-muted: #20242a;
    --text-main: #f4f5f7;
    --text-muted: #94a3b8;
    --border: #333842;
    --border-hover: #4b5262;
    --primary-light: rgb(243 108 33 / .12);
    --link: #ffab7a;
    --danger: #ef7676;
    --danger-bg: #301c20;
    --danger-border: #643039;
    --success: #45c990;
    --success-bg: #142c24;
    --success-border: #26523e;
    --warning: #e4aa48;
    --warning-bg: #302719;
    --warning-border: #66512e;
    --info: #7dc9f5;
    --info-bg: #172a36;
    --info-border: #2c4c60;
    --focus: #8f969f;
    --ring: rgb(243 108 33 / .22);
    --shadow-sm: inset 0 1px 0 rgb(255 255 255 / .035), 0 20px 50px -38px rgb(0 0 0 / .9);
    --shadow-md: 0 18px 40px -24px rgb(0 0 0 / .7);
    --shadow-lg: 0 28px 70px -30px rgb(0 0 0 / .92), inset 0 1px 0 rgb(255 255 255 / .08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-body); color: var(--text-main); font: 400 11px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a { color: var(--link); }
button, summary { cursor: pointer; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3, h4, strong, b { font-weight: 600; }
code, pre { font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
pre { max-width: 100%; overflow: auto; }
button, a, input, select, textarea, summary { scroll-margin: 90px 12px; }
:where(a, button, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; vertical-align: middle; }
.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; }
.skip-link { position: fixed; top: 8px; left: 72px; z-index: 200; padding: 10px; background: var(--bg-surface); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

/* The desktop rail expands over the canvas, preserving table geometry. */
.app-container { min-height: 100dvh; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 50; display: flex; flex-direction: column; background: #121416; color: #c1c5cb; border-right: 1px solid rgb(255 255 255 / .07); transition: width var(--motion-normal) var(--ease); }
.sidebar-header { display: flex; align-items: center; gap: 10px; height: 58px; flex-shrink: 0; padding: 10px 12px; overflow: hidden; }
.brand-icon { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; background: var(--primary); color: white; border: 1px solid rgb(0 0 0 / .08); border-radius: 10px; font-size: 17px; font-weight: 600; }
.brand-text { min-width: 0; white-space: nowrap; }
.brand-text h1 { font-size: 14px; letter-spacing: -.025em; }
.brand-text p { font-size: 9px; color: var(--text-muted); }
.app-sidebar .brand-text p { color: #9299a2; }
.sidebar-nav { flex: 1; min-height: 0; overflow: auto; padding: 5px 8px 12px; scrollbar-width: thin; scrollbar-color: #45494e transparent; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 11px; margin-bottom: 5px; border: 1px solid transparent; border-radius: 10px; color: #9299a2; font-size: 11px; text-decoration: none; white-space: nowrap; overflow: hidden; transition: color var(--motion-fast), background-color var(--motion-fast), border-color var(--motion-fast); }
.nav-item .icon { width: 21px; height: 21px; }
.nav-item:hover { color: #fff; background: rgb(255 255 255 / .06); }
.nav-item.active { color: #f8ae80; background: rgb(243 108 33 / .13); border-color: rgb(243 108 33 / .22); box-shadow: inset 2px 0 0 var(--primary); }
.nav-item.disabled { opacity: .45; pointer-events: none; }
.nav-section-title { height: 12px; padding: 0 11px; overflow: hidden; color: #8c939d; font-size: 9px; font-weight: 500; white-space: nowrap; }
.sidebar-footer { padding: 8px; border-top: 1px solid rgb(255 255 255 / .08); display: grid; gap: 8px; overflow: hidden; }
.sidebar-footer .btn { color: #c1c5cb; border-color: #34383e; }
.sidebar-footer .btn:hover { background: #262a30; color: #fff; }
.sidebar-footer .operator-info { color: #c1c5cb; }
.app-sidebar .brand-text, .nav-label, .operator-info, .nav-section-title span, .logout-label { opacity: 0; transition: opacity 120ms; }
.app-sidebar:is(:hover,:focus-within), .app-sidebar[data-pinned='true'] { width: 244px; box-shadow: 12px 0 36px -24px rgb(0 0 0 / .5); }
.app-sidebar:is(:hover,:focus-within) :is(.brand-text,.nav-label,.operator-info,.nav-section-title span,.logout-label), .app-sidebar[data-pinned='true'] :is(.brand-text,.nav-label,.operator-info,.nav-section-title span,.logout-label) { opacity: 1; }
.app-main { margin-left: var(--sidebar-width); min-width: 0; padding: 14px 28px 28px; }
.app-header { position: relative; min-height: 70px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 0 0 14px 14px; background: color-mix(in srgb, var(--bg-surface) 92%, transparent); box-shadow: var(--shadow-sm); }
.header-context { min-width: 0; flex: 1; }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 10px; margin-bottom: 2px; }
.breadcrumb a { text-decoration: none; color: inherit; }
.header-title { font-size: 18px; font-weight: 600; letter-spacing: -.035em; line-height: 1.25; overflow-wrap: anywhere; }
.header-actions, .user-badge-group { display: flex; align-items: center; gap: 10px; }
.user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #121416; color: white; font-size: 11px; font-weight: 600; }
.app-content { width: 100%; min-width: 0; padding-top: 12px; }
.mobile-menu-toggle, .sidebar-backdrop { display: none; }
.theme-toggle, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; min-width: 32px; padding: 5px 8px; color: var(--text-muted); border: 1px solid var(--border); background: var(--bg-surface); border-radius: 10px; font-size: 11px; transition: color 160ms, background-color 160ms; }
.theme-toggle:hover, .icon-button:hover { color: var(--text-main); background: var(--bg-subtle); }
.theme-toggle .icon { width: 16px; height: 16px; }
.mobile-menu-toggle { display: none; }
.sidebar-footer .btn { min-width: 40px; justify-content: flex-start; padding-inline: 11px; overflow: hidden; background: transparent; }
.sidebar-footer .operator-info { display: none; }
.app-sidebar:is(:hover,:focus-within) .operator-info { display: block; }
.theme-toggle [data-dark-icon] { display: none; }
[data-theme='dark'] .theme-toggle [data-dark-icon] { display: block; }
[data-theme='dark'] .theme-toggle [data-light-icon] { display: none; }

/* Shared compact controls; individual fields own only width and placement. */
.form-group { min-width: 0; margin-bottom: 12px; }
.form-label { display: block; font-size: 11px; font-weight: 500; margin-bottom: 4px; }
.form-input, .form-control { display: block; width: 100%; min-width: 0; height: 36px; padding: 6px 10px; color: var(--text-main); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-control); outline: none; font-size: 11px; line-height: 1.4; transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background-color var(--motion-fast); }
:is(.form-input,.form-control):hover { border-color: var(--border-hover); }
:is(.form-input,.form-control):focus { border-color: var(--focus); box-shadow: 0 0 0 2px var(--ring); }
:is(.form-input,.form-control)::placeholder { color: var(--text-muted); opacity: 1; }
:is(.form-input,.form-control):disabled, :is(.form-input,.form-control)[readonly] { background: var(--input-disabled-bg); color: var(--text-muted); }
textarea.form-control, textarea.form-input { height: auto; min-height: 72px; resize: vertical; }
select.form-control, select.form-input { padding-right: 24px; }
input:is([type=checkbox],[type=radio]) { width: 15px; height: 15px; accent-color: var(--primary); flex-shrink: 0; }
input:is([type=checkbox],[type=radio]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.form-checkbox, .form-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.form-checkbox { cursor: pointer; color: var(--text-muted); }
.form-row { justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.form-help, .form-hint, .form-error { display: block; font-size: 10px; margin-top: 4px; color: var(--text-muted); }
.form-error { color: var(--danger); }
.form-link { color: var(--link); text-decoration: none; font-weight: 500; }
.form-link:hover { text-decoration: underline; }
.form-grid-2, .form-grid-3, .responsive-grid { display: grid; gap: 12px; }
.form-grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.responsive-grid { grid-template-columns: var(--grid-columns); }
.responsive-grid > *, .form-grid-2 > *, .form-grid-3 > * { min-width: 0; }
.flex-row { flex-wrap: wrap; }
.form-actions-bar, .filter-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 10px; }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 13px; border: 1px solid transparent; border-radius: var(--radius-control); font-size: 12px; font-weight: 600; line-height: 1.2; text-decoration: none; background: var(--bg-subtle); color: var(--text-main); cursor: pointer; transition: background-color var(--motion-fast) var(--ease),border-color var(--motion-fast) var(--ease),box-shadow var(--motion-fast) var(--ease),color var(--motion-fast) var(--ease); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: var(--primary-text); border-color: color-mix(in srgb,var(--primary) 85%,#000); }
.btn-primary:hover { background: var(--primary-hover); border-color: #d95712; box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); }
.btn:active { box-shadow: inset 0 2px 4px rgb(0 0 0 / .13); }
.btn-primary:active { background: #d95712; }
.btn-outline, .btn-secondary { border-color: var(--border); background: var(--bg-surface); color: var(--text-main); }
:is(.btn-outline,.btn-secondary):hover { background: var(--bg-subtle); border-color: var(--border-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 28px; padding-inline: 9px; font-size: 11px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible { outline-offset: 2px; }

/* Surfaces and status colors are shared by every ROOT module. */
.card, .form-section-card, .tenant-header-card, .stat-card { min-width: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-sm); padding: 13px; }
.form-section-card, .tenant-header-card { margin-bottom: 14px; }
.form-section-card { box-shadow: inset 0 2px 0 color-mix(in srgb,var(--primary) 72%,transparent),var(--shadow-sm); }
.card-header, .form-section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.form-section-header { display: block; }
.card-title, .form-section-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.form-section-desc { margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.card-body-dl { display: grid; grid-template-columns: minmax(90px,130px) minmax(0,1fr); gap: 8px; font-size: 11px; }
.card-body-dl dt { color: var(--text-muted); }
.card-body-dl dd { overflow-wrap: anywhere; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: 12px; margin-bottom: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); gap: 10px; margin-bottom: 14px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; transition: border-color 160ms; }
.stat-card:hover { border-color: var(--border-hover); }
.stat-label { color: var(--text-muted); font-size: 10px; font-weight: 500; }
.stat-value { font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.stat-subtext { font-size: 10px; color: var(--text-muted); }
.tenant-header-card, .tenant-title-row, .tenant-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tenant-header-card { justify-content: space-between; }
.tenant-header-info { display: grid; gap: 6px; min-width: 0; }
.tenant-title { font-size: 22px; font-weight: 600; }
.tenant-meta-row { font-size: 11px; color: var(--text-muted); overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 10px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.badge-owner, .badge-env-prod { color: var(--link); background: var(--primary-light); border-color: color-mix(in srgb,var(--primary) 22%,transparent); }
.badge-success, .badge-active { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-danger, .badge-suspended { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-warning, .badge-draft, .badge-closing { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-env-lab { color: var(--info); background: var(--info-bg); border-color: var(--info-border); }
.badge-env-demo { color: var(--link); background: var(--primary-light); }
.badge-archived, .badge-outline { color: var(--text-muted); background: var(--bg-subtle); border-color: var(--border); }
.alert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 11px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.alert-success { color: var(--success); border-color: var(--success-border); }
.alert-danger { color: var(--danger); border-color: var(--danger-border); }
.alert-warning { color: var(--warning); border-color: var(--warning-border); }
.alert .icon { width: 16px; height: 16px; }
.alert > div { min-width: 0; overflow-wrap: anywhere; }

.filter-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px; margin-bottom: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); }
.filter-group { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.filter-input { min-width: min(100%,220px); flex: 1; }
.filter-select { width: auto; min-width: 140px; }
.table-container, .table-responsive { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); margin-bottom: 12px; scrollbar-width: thin; }
.platform-table, .data-table, .table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
:is(.platform-table,.data-table,.table) th { height: 35px; background: var(--bg-subtle); color: var(--text-muted); padding: 7px 11px; border-bottom: 1px solid var(--border); font-size: 10px; font-weight: 600; text-transform: uppercase; white-space: nowrap; }
:is(.platform-table,.data-table,.table) td { padding: 7px 11px; border-bottom: 1px solid var(--border); vertical-align: middle; line-height: 1.4; }
:is(.platform-table,.data-table,.table) tbody tr:last-child td { border-bottom: 0; }
:is(.platform-table,.data-table,.table) tbody tr { transition: background-color var(--motion-fast); }
:is(.platform-table,.data-table,.table) tbody tr:hover { background: var(--bg-subtle); }
:is(.platform-table,.data-table,.table) .btn { min-height: 28px; padding-inline: 8px; font-size: 11px; }
.table-empty, .empty-state { padding: 36px 18px; text-align: center; color: var(--text-muted); }
.table-empty-icon, .empty-icon { display: flex; justify-content: center; margin-bottom: 9px; color: var(--text-muted); }
:is(.table-empty-icon,.empty-icon) .icon { width: 32px; height: 32px; stroke-width: 1.3; }
.empty-text { font-size: 11px; }
.code-badge { display: inline-block; padding: 2px 5px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 5px; font-size: 10px; }
.pagination-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; font-size: 11px; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; }
.pagination-links { display: flex; align-items: center; gap: 4px; }
.pagination-link { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 30px; padding: 3px 8px; border: 1px solid transparent; border-radius: 8px; color: var(--text-main); text-decoration: none; }
.pagination-link.active { background: var(--primary); color: #fff; }
.pagination-link:hover { background: var(--bg-subtle); }
.pagination-link.disabled { opacity: .4; pointer-events: none; }
.pagination-info { color: var(--text-muted); }
.cell-align-right { text-align: right; }
.cell-nowrap { white-space: nowrap; }
.pagination-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; padding: 9px 12px; }
.pagination-mobile { display: none; }
.pagination-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.pagination-detail { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; width: 100%; }

.audit-timeline { display: flex; flex-direction: column; gap: 12px; padding-left: 22px; position: relative; }
.audit-timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 1px; background: var(--border); }
.timeline-item { position: relative; display: flex; flex-direction: column; gap: 5px; }
.timeline-dot { position: absolute; left: -22px; top: 4px; width: 13px; height: 13px; border: 2px solid var(--primary); border-radius: 50%; background: var(--bg-surface); }
.timeline-header { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; }
.timeline-action { font-weight: 600; }
.timeline-actor, .timeline-time { color: var(--text-muted); font-size: 10px; }
.timeline-time { margin-left: auto; }
.timeline-payload { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 8px; padding: 8px; font-size: 10px; overflow: auto; max-height: 140px; }

/* Existing inline modal triggers are retained; accessibility is enhanced in platform.js. */
.platform-modal { position: fixed; inset: 0; z-index: 100; align-items: center; justify-content: center; padding: 20px; background: rgb(8 10 14 / .52); backdrop-filter: blur(4px); }
.platform-modal > .card { width: min(100%,600px); max-height: calc(100dvh - 40px); overflow-y: auto; border-radius: var(--radius-modal); background: var(--bg-surface); box-shadow: var(--shadow-lg); padding: 18px; animation: modal-enter 220ms var(--ease) both; }
.platform-modal .modal-close { min-height: 32px; min-width: 32px; border-radius: 8px; color: var(--text-muted); background: transparent; border: 0; }
.platform-modal .modal-close:hover { background: var(--bg-subtle); }
.confirmation-dialog { width: min(460px,calc(100vw - 32px)); padding: 18px; color: var(--text-main); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-modal); box-shadow: var(--shadow-lg); }
.confirmation-dialog[open] { animation: modal-enter 220ms var(--ease); }
.confirmation-dialog::backdrop { background: rgb(8 10 14 / .52); backdrop-filter: blur(4px); }
@keyframes modal-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.platform-dropdown { position: relative; }
.platform-dropdown > summary { list-style: none; }
.platform-dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 210px; max-width: min(320px,calc(100vw - 32px)); padding: 12px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 11px; animation: modal-enter 160ms var(--ease); }
.dropdown-panel label { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.table-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 11px; border-bottom: 1px solid var(--border); }
.platform-tooltip { position: fixed; z-index: 180; padding: 5px 9px; background: #1c2025; color: #f4f5f7; border: 1px solid #454b54; border-radius: 7px; box-shadow: var(--shadow-md); font-size: 10px; pointer-events: none; max-width: 260px; }
.auth-wrapper { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-header-bar { width: min(100%,400px); display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-card { width: min(100%,400px); background: var(--bg-surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 28px; }
.auth-title { font-size: 22px; font-weight: 600; letter-spacing: -.03em; margin-bottom: 5px; }
.auth-subtitle { font-size: 11px; color: var(--text-muted); margin-bottom: 20px; }

@media (max-width: 1023px) {
    .app-main { margin-left: 0; padding: 12px 16px 24px; }
    .app-sidebar { width: 244px; transform: translateX(-100%); transition: transform 240ms var(--ease); }
    .app-sidebar :is(.brand-text,.nav-label,.operator-info,.nav-section-title span,.logout-label) { opacity: 1; }
    .app-sidebar[data-open=true] { transform: none; }
    .mobile-menu-toggle { display: inline-flex; }
    .sidebar-backdrop[data-open=true] { display: block; position: fixed; inset: 0; z-index: 45; background: rgb(0 0 0 / .4); border: 0; }
    .app-header { min-height: 64px; }
    .header-title { font-size: 16px; }
}
@media (max-width: 640px) {
    .app-main { padding: 8px 12px 20px; }
    .header-actions { gap: 6px; }
    .header-actions .user-badge-group, #themeLabel { display: none; }
    .header-title { font-size: 14px; }
    .app-header { gap: 8px; padding: 9px; }
    .breadcrumb { font-size: 9px; }
    .form-grid-2, .form-grid-3, .responsive-grid { grid-template-columns: minmax(0,1fr); }
    .grid-cards { grid-template-columns: minmax(0,1fr); }
    .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .filter-toolbar, .filter-group { flex-direction: column; align-items: stretch; }
    .filter-select, .filter-input { min-width: 0; width: 100%; }
    .filter-actions { justify-content: flex-start; }
    .card-body-dl { grid-template-columns: minmax(0,1fr); gap: 3px; }
    .card-body-dl dd { margin-bottom: 5px; }
    .form-row { gap: 10px; }
    .platform-modal { padding: 12px; }
    .platform-modal > .card { max-height: calc(100dvh - 24px); padding: 14px; }
    .pagination-mobile { display: flex; justify-content: space-between; gap: 8px; width: 100%; }
    .pagination-detail { display: none; }
    .auth-card { padding: 22px; }
    .btn, .form-input, .form-control, .theme-toggle, .mobile-menu-toggle { min-height: 40px; }
    .table-tools { min-height: 44px; }
    .table-container, .table-responsive { border: 0; background: transparent; overflow: visible; }
    .table-tools { border: 1px solid var(--border); background: var(--bg-surface); border-radius: 10px; margin-bottom: 10px; }
    :is(.platform-table,.data-table,.table), :is(.platform-table,.data-table,.table) tbody { display: block; width: 100%; }
    :is(.platform-table,.data-table,.table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    :is(.platform-table,.data-table,.table) tbody tr { display: block; margin-bottom: 12px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: inset 0 2px 0 rgb(243 108 33 / .22); overflow: hidden; }
    :is(.platform-table,.data-table,.table) td { display: block; width: 100%; padding: 10px 12px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
    :is(.platform-table,.data-table,.table) td[data-column-label]::before { content: attr(data-column-label); display: block; margin-bottom: 3px; color: var(--text-muted); font-size: 9px; font-weight: 600; text-transform: uppercase; }
    :is(.platform-table,.data-table,.table) td[colspan]::before { display: none; }
    :is(.platform-table,.data-table,.table) td[colspan] { text-align: center; padding-block: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
