:root {
    --bg: #edf2ff;
    --card: #ffffff;
    --surface: rgba(255,255,255,0.65);
    --surface-strong: rgba(255,255,255,0.9);
    --body: #0f172a;
    --muted: #6b7280;
    --border: rgba(15,23,42,0.12);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #0ca678;
    --header: #0c4a6e;
    --print-font-scale: 1;
    --panel-scale: 1;
    --table-font-scale: 1;
    --table-font-size: 0.8rem;
}
[data-theme='dark'] {
    --bg: #0b1220;
    --card: #0f172a;
    --surface: rgba(15,23,42,0.75);
    --surface-strong: rgba(30,41,59,0.9);
    --body: #e5e7eb;
    --muted: #94a3b8;
    --border: rgba(255,255,255,0.1);
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --success: #34d399;
    --header: #0e7490;
}

body { background: var(--bg); color: var(--body); font-family: 'Pretendard', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; position: relative; min-height: 100vh; }
.app-gradient { position: fixed; inset: 0; background: radial-gradient(circle at 10% 20%, rgba(14,116,144,0.22), transparent 55%), radial-gradient(circle at 80% 0%, rgba(37,99,235,0.25), transparent 45%), radial-gradient(circle at 50% 80%, rgba(14,165,233,0.25), transparent 50%); z-index: -2; }

.container { width: min(1200px, calc(100% - 2rem)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px); background: linear-gradient(to bottom, rgba(255,255,255,0.82), rgba(255,255,255,0)); border-bottom: 1px solid rgba(255,255,255,0.4); }
.header-line { padding: 1rem 0; display: flex; align-items: center; justify-content: space-between; color: var(--body); }
.branding { display: flex; gap: 0.9rem; align-items: center; }
.logo-tile { height: 56px; width: 56px; border-radius: 1.35rem; background: rgba(37,99,235,0.15); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(37,99,235,0.35); }
.logo-tile img { height: 36px; width: 36px; object-fit: contain; }
.brand-subtitle { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.header-title { font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; }
.header-actions { display: flex; gap: 0.6rem; align-items: center; }
.toggle-pill { padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.7); color: #fff; background: rgba(255,255,255,0.1); }
.logout-pill { padding: 0.45rem 1rem; border-radius: 999px; background: #f8fafc; color: var(--header); font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,0.12); text-decoration: none; border: 1px solid rgba(12,74,110,0.15); }

.nav-row { margin-top: 0.25rem; margin-bottom: 0.75rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.65rem; }
.nav-pill { padding: 0.65rem 1rem; border-radius: 1rem; background: linear-gradient(135deg, #0a63d1, #0bb4d1); color: #fff; font-weight: 600; box-shadow: 0 14px 30px rgba(10,99,209,0.2); transition: transform 0.2s ease, box-shadow 0.2s ease; text-decoration: none; display: flex; align-items: center; justify-content: center; white-space: nowrap; letter-spacing: 0.02em; }
.nav-pill:hover { transform: translateY(-2px); box-shadow: 0 18px 32px rgba(10,99,209,0.25); }

.page-container { padding: 2.75rem 0 4rem; }
.page-footer { padding-bottom: 2rem; text-align: center; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.65rem 1.15rem; border-radius: 1rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-weight: 700; box-shadow: 0 18px 35px rgba(37,99,235,0.25); border: none; text-decoration: none; }
.btn-primary:hover { opacity: 0.95; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; padding: 0.65rem 1.15rem; border-radius: 1rem; background: var(--surface-strong); color: var(--body); border: 1px solid rgba(15,23,42,0.08); font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px rgba(15,23,42,0.08); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 0.9rem; border-radius: 0.9rem; border: 1px solid var(--border); color: var(--body); background: transparent; text-decoration: none; }

.input { width: 100%; border: 1px solid var(--border); padding: 0.65rem 0.85rem; border-radius: 0.9rem; background: var(--card); transition: border-color 0.15s ease; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

.login-page { background: var(--bg); color: var(--body); min-height: 100vh; overflow: hidden; }
.login-page header,
.login-page .nav-row,
.login-page footer { display: none; }
.login-page main { max-width: none; padding: 0 !important; margin: 0; width: 100%; }
.login-full { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
.login-shell { width: min(960px, 100%); display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; background: var(--surface-strong); padding: 2.5rem; border-radius: 2rem; border: 1px solid rgba(12,74,110,0.15); box-shadow: 0 35px 70px rgba(12,74,110,0.18); }
.login-brand { color: var(--body); display: flex; flex-direction: column; gap: 1rem; }
.login-logo { width: 72px; height: 72px; border-radius: 1.5rem; background: rgba(12,74,110,0.08); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(12,74,110,0.2); }
.login-logo img { width: 48px; height: 48px; object-fit: contain; }
.login-brand h1 { font-size: 2.1rem; font-weight: 700; margin: 0; }
.login-brand p { margin: 0; font-size: 0.95rem; opacity: 0.9; }
.brand-kicker { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.2em; opacity: 0.7; }
.login-card { background: rgba(255,255,255,0.95); padding: 2rem; border-radius: 1.5rem; border: 1px solid rgba(15,23,42,0.08); color: var(--body); box-shadow: 0 25px 50px rgba(15,23,42,0.18); }
.login-card h2 { font-size: 1.5rem; margin: 0 0 0.3rem; }
.login-sub { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin-bottom: 1.5rem; }
.login-label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.35rem; }
.login-input { width: 100%; border-radius: 0.9rem; padding: 0.75rem 0.9rem; border: 1px solid var(--border); background: var(--surface); color: var(--body); }

.column-page { display: flex; flex-direction: column; gap: 1.5rem; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-header h1 { font-size: 2rem; margin: 0.15rem 0; }
.eyebrow { text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.2em; color: var(--muted); margin: 0; }
.subtitle { color: var(--muted); margin: 0.15rem 0 0; }
.alert-error { padding: 0.75rem 1rem; background: rgba(239,68,68,0.12); color: #b91c1c; border-radius: 0.75rem; border: 1px solid rgba(185,28,28,0.3); font-weight: 600; }
.column-stack { display: flex; flex-direction: column; gap: 1.5rem; }
.grid-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-header h2 { margin: 0; font-size: 1.3rem; }
.card-header p { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-stack { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.form-stack label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); width: 100%; }
.form-stack .input,
.form-stack select { width: 100%; box-sizing: border-box; }
.form-stack .toggle-row { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.85rem; align-items: center; }
.form-stack .toggle-row label { flex-direction: row; gap: 0.4rem; align-items: center; width: auto; }
.form-stack .full { width: 100%; }
.column-board .actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.column-table-wrap { border: 1px solid var(--border); border-radius: 1.25rem; overflow: hidden; background: var(--card); width: 100%; overflow-x: auto; }
.column-table-head { display: grid; grid-template-columns: 2.2fr 1fr 1.8fr 1fr 1.2fr 0.9fr; align-items: center; background: var(--surface); padding: 0.75rem 1rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.column-table-body { display: flex; flex-direction: column; }
.column-row { display: grid; grid-template-columns: 2.2fr 1fr 1.8fr 1fr 1.2fr 0.9fr; align-items: stretch; border-top: 1px solid var(--border); min-width: 720px; }
.column-row.is-hidden { opacity: 0.6; }
.column-cell { padding: 0.85rem 1rem; background: var(--card); display: flex; align-items: center; gap: 0.5rem; min-width: 0; flex-wrap: wrap; }
.column-cell.info { gap: 0.75rem; }
.column-cell .input,
.column-cell select { max-width: 100%; }
.column-cell.type select,
.column-cell.default input { min-width: 120px; flex: 1 1 140px; }
.column-cell.toggles { flex-wrap: wrap; font-size: 0.82rem; gap: 0.5rem 1rem; }
.column-cell.radio { justify-content: center; }
.column-cell.actions { justify-content: center; }
.drag-handle { background: rgba(15,23,42,0.05); border: none; border-radius: 0.75rem; padding: 0.35rem 0.6rem; cursor: grab; }
.column-row.dragging .column-cell { background: rgba(37,99,235,0.08); }
.label-line { display: flex; align-items: center; gap: 0.5rem; }
.label-line .input.small { width: 100%; max-width: 180px; }
.input.small { padding: 0.4rem 0.7rem; border-radius: 0.75rem; font-size: 0.9rem; width: 100%; }
.badge-blue { background: rgba(37,99,235,0.15); color: #1d4ed8; padding: 0.15rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge-grey { background: rgba(100,116,139,0.15); color: #475569; padding: 0.15rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.column-table-body { background: var(--card); }
.column-table-body .empty-text { padding: 2rem; text-align: center; color: var(--muted); }
.radio-line { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; }

.chip-btn { border: 1px solid var(--border); border-radius: 999px; padding: 0.35rem 0.9rem; background: var(--surface); font-size: 0.85rem; cursor: pointer; }
.chip-delete { background: rgba(239,68,68,0.1); color: #b91c1c; border-color: rgba(239,68,68,0.4); }

.settings-card { padding: 2rem; }
.settings-hero { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.settings-hero h2 { margin: 0; font-size: 1.35rem; }
.settings-hero p { margin: 0.3rem 0 0; color: var(--muted); }
.settings-badge { padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(37,99,235,0.12); color: var(--primary-dark); font-weight: 600; font-size: 0.85rem; }
.settings-form { display: flex; flex-direction: column; gap: 2rem; }
.settings-section h3 { margin: 0 0 0.6rem; font-size: 1.05rem; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.5rem; }
.settings-grid label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); }
.settings-grid label span { color: var(--body); font-weight: 600; font-size: 0.9rem; }
.settings-grid label.full { grid-column: 1 / -1; }
.settings-grid .help-text { font-size: 0.78rem; color: var(--muted); }
.help-text { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; }
.logo-preview { display: flex; flex-direction: column; gap: 0.35rem; }
.logo-preview.full { grid-column: 1 / -1; }
.logo-preview span { font-weight: 600; font-size: 0.9rem; }
.preview-frame { width: 120px; height: 120px; border-radius: 1rem; background: var(--surface); display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); }
.preview-frame img { max-width: 80px; max-height: 80px; object-fit: contain; }
.settings-actions { display: flex; justify-content: flex-end; gap: 0.75rem; padding-top: 0.5rem; }
.qr-regen-form { margin-top: 1rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.login-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.login-error { padding: 0.75rem 1rem; border-radius: 0.9rem; background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.2); color: #b91c1c; margin-bottom: 1rem; }

.badge { padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.75rem; }
.badge-green { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-red { background: #fef2f2; color: #dc2626; }
.qr-thumb { height: 64px; width: 64px; object-fit: contain; display: block; margin: 0 auto; }
.photo-link { display: block; }
.asset-photo { width: 100%; max-width: 100%; max-height: 380px; object-fit: contain; }
.qr-large { width: 100%; max-width: 220px; margin: 0 auto; display: block; object-fit: contain; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.85rem; }
.photo-thumb-link { display: block; }
.photo-thumb { width: 100%; height: 160px; border-radius: 0.9rem; object-fit: cover; border: 1px solid var(--border); background: #fff; }
.photo-item { background: var(--surface); border: 1px solid rgba(15,23,42,0.08); border-radius: 1rem; padding: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.photo-remove { font-size: 0.8rem; color: var(--muted); display: inline-flex; align-items: center; gap: 0.3rem; }
.photo-dropzone { border: 1px dashed rgba(15,23,42,0.2); border-radius: 1rem; padding: 1.5rem; text-align: center; background: rgba(15,23,42,0.02); transition: border-color 0.2s ease, background 0.2s ease; }
.photo-dropzone.drag-active { border-color: var(--primary); background: rgba(37,99,235,0.08); }
.ai-helper { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ai-status { font-size: 0.85rem; color: var(--muted); }
.ai-status.error { color: #dc2626; }
.btn-link { color: var(--primary); text-decoration: underline; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.form-grid .col-span-full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 0.75rem; }
.form-card { width: 100%; max-width: min(1200px, 100%); margin: 0 auto; }
.alert-info { padding: 0.8rem 1rem; border-radius: 0.9rem; background: rgba(37,99,235,0.1); border: 1px solid rgba(37,99,235,0.2); color: var(--body); font-size: 0.9rem; }

.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: inherit; }
.table thead { background: var(--surface-strong); }
.table th, .table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); text-align: left; font-size: inherit; }
.table tr:hover { background: var(--surface); }
.hidden-col { display: none !important; }
.sort-btn { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; border: none; background: transparent; color: inherit; cursor: pointer; padding: 0; }
.sort-btn .caret { font-size: 0.75rem; opacity: 0.6; }

.card { background: var(--surface-strong); border: 1px solid rgba(255,255,255,0.45); border-radius: 1.2rem; padding: 1.5rem; box-shadow: 0 25px 60px rgba(15,23,42,0.08); backdrop-filter: blur(14px); }
.shadow-soft { box-shadow: 0 12px 30px rgba(0,0,0,0.08); }

.selection-panel { border-top: 1px dashed rgba(15,23,42,0.15); padding-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.selection-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.selection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.8rem; width: 100%; }
.selection-card { border: 1px dashed rgba(15,23,42,0.18); border-radius: 1rem; padding: 0.9rem; background: var(--card); display: flex; flex-direction: column; gap: 0.6rem; }
.selection-title { font-weight: 600; font-size: 0.95rem; }
.option-field { width: 100%; }
.option-field span { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 0.2rem; }
.option-field input { width: 100%; border: 1px solid var(--border); border-radius: 0.75rem; padding: 0.45rem 0.6rem; background: var(--surface-strong); }
.columns-list { display: flex; flex-direction: column; gap: 0.35rem; max-height: 180px; overflow-y: auto; }
.columns-list label { font-size: 0.9em; display: flex; align-items: center; gap: 0.45rem; }
.page-grid { display: flex; gap: 2rem; }
.main-column { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.table-card { display: flex; flex-direction: column; height: calc(100vh - 260px); font-size: var(--table-font-size, 0.8rem); }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.page-size-select { display: flex; align-items: center; gap: 0.45rem; }
.page-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.page-index { display: flex; align-items: center; gap: 0.35rem; }
.page-btn, .page-link { border: 1px solid rgba(15,23,42,0.12); background: var(--surface); color: var(--body); border-radius: 0.6rem; padding: 0.35rem 0.8rem; font-weight: 600; cursor: pointer; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-current { padding: 0.35rem 0.8rem; border-radius: 0.6rem; background: var(--primary); color: #fff; font-weight: 700; }
.page-ellipsis { color: var(--muted); font-size: 0.9rem; }
.page-summary { font-size: 0.85rem; color: var(--muted); margin-left: 0.5rem; }
.table-scroll { flex: 1; overflow: auto; }
.floating-actions { position: sticky; top: 7rem; width: 320px; align-self: flex-start; }
.floating-inner { display: flex; flex-direction: column; gap: 1rem; }
.quick-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quick-grid .btn-primary,
.quick-grid .btn-secondary { flex: 1 1 calc(50% - 0.5rem); }

.page-grid { display: flex; gap: 2rem; }
.main-column { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.floating-window { position: fixed; top: 6.2rem; right: 1.25rem; width: var(--panel-width, 360px); max-width: calc(100% - 2.5rem); max-height: calc(100vh - 5rem); z-index: 120; display: flex; flex-direction: column; font-size: calc(1rem * var(--panel-scale, 1)); }
.floating-window-left { left: 1.25rem; right: auto; }
.floating-window .btn-primary,
.floating-window .btn-secondary,
.floating-window .btn-ghost { font-size: 1em; }
.floating-header { display: flex; justify-content: space-between; align-items: center; background: var(--surface-strong); border: 1px solid rgba(15,23,42,0.12); border-radius: 1rem 1rem 0 0; padding: 0.55rem 0.85rem; cursor: grab; user-select: none; position: relative; z-index: 2; }
.floating-window.dragging .floating-header { cursor: grabbing; }
.floating-controls { display: flex; align-items: center; gap: 0.4rem; }
.floating-zoom-btn { width: 30px; height: 30px; border-radius: 0.7rem; border: 1px solid rgba(15,23,42,0.15); background: var(--card); font-weight: 700; font-size: 1.05rem; color: var(--body); cursor: pointer; }
.floating-body { background: var(--surface-strong); border: 1px solid rgba(15,23,42,0.12); border-top: none; border-radius: 0 0 1rem 1rem; padding: 0.9rem; box-shadow: 0 20px 40px rgba(15,23,42,0.12); overflow-y: auto; flex: 1; }
.floating-body::-webkit-scrollbar { width: 6px; }
.floating-body::-webkit-scrollbar-thumb { background: rgba(15,23,42,0.2); border-radius: 999px; }
.floating-window.collapsed .floating-body { display: none; }
.floating-toggle { border: none; background: transparent; color: var(--primary); font-weight: 600; cursor: pointer; }
.floating-section { border: 1px solid rgba(15,23,42,0.08); border-radius: 1rem; padding: 0.85rem; background: var(--card); display: flex; flex-direction: column; gap: 0.6rem; }
.floating-section + .floating-section { margin-top: 0.85rem; }
.pill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.45rem; }
.pill-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pill-grid.compact { gap: 0.4rem; }
.pill-grid a,
.pill-grid button { width: 100%; text-align: center; }
.quick-section { display: flex; flex-direction: column; gap: 0.45rem; padding-bottom: 0.2rem; }
.quick-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.chip-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip-btn { padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid rgba(15,23,42,0.18); background: var(--surface); font-size: 0.9em; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--body); }
.action-btn { width: 100%; padding: 0.55rem 0.75rem; border-radius: 0.8rem; border: 1px solid rgba(15,23,42,0.16); background: var(--surface); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--body); gap: 0.35rem; font-size: 1em; line-height: 1.2; font-family: inherit; cursor: pointer; box-sizing: border-box; box-shadow: 0 8px 18px rgba(15,23,42,0.08); transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; }
.action-btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-color: transparent; box-shadow: 0 12px 24px rgba(37,99,235,0.25); }
.action-btn.primary.outline { background: rgba(13,110,253,0.15); color: var(--primary-dark); border-color: rgba(37,99,235,0.4); }
.action-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15,23,42,0.15); filter: brightness(1.02); }
.floating-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.9em; color: var(--muted); }
.floating-field input { width: 100%; border: 1px solid var(--border); border-radius: 0.7rem; padding: 0.4rem 0.6rem; background: var(--surface-strong); box-sizing: border-box; font-size: 1em; }
.option-stack { display: flex; flex-direction: column; gap: 0.45rem; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
.toggle-line { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9em; color: var(--muted); }
.filter-grid { display: flex; flex-direction: column; gap: 0.65rem; }
.filter-grid .action-btn { width: 100%; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.row-actions .chip-btn { padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.chip-view { background: rgba(37,99,235,0.12); color: var(--primary); }
.chip-copy { background: rgba(14,165,233,0.12); color: #0ea5e9; }
.chip-delete { background: rgba(248,113,113,0.15); color: #ef4444; border-color: rgba(239,68,68,0.35); }

@media (max-width: 1024px) {
    .header-line { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
    .header-actions { width: 100%; justify-content: flex-end; }
    .nav-pill { font-size: 0.92rem; }
    .selection-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .page-grid { flex-direction: column; }
    .floating-window { right: 1rem; left: auto; }
    .floating-window-left { left: 1rem; }
}

@media (max-width: 768px) {
    .table-card { font-size: var(--table-font-size, 0.65rem); }
    .table th, .table td { padding: 0.65rem; }
    .nav-pill { min-width: calc(50% - 0.5rem); font-size: 0.9rem; }
    .btn-primary, .btn-secondary { width: 100%; }
    .selection-grid { grid-template-columns: 1fr; }
    .floating-window { width: calc(100% - 32px); left: 16px; right: auto; top: 5rem; }
    .floating-window-left { left: 16px; }
    .pill-grid.two-col { grid-template-columns: 1fr; }
}

@media print {
    header, footer, .btn-primary, .btn-secondary, .btn-ghost, .nav-pill, form, .print-hide { display: none !important; }
    body { background: #fff; color: #000; }
    .card { border: 1px solid #d1d5db; box-shadow: none; }
    .table th, .table td { border: 1px solid #d1d5db; }
}

.table-font-controls { display: flex; align-items: center; gap: 0.35rem; margin-left: 0.75rem; }
.font-btn { width: 36px; height: 32px; border-radius: 0.6rem; border: 1px solid rgba(15,23,42,0.12); background: var(--surface); font-weight: 600; cursor: pointer; }
