/* STR Ops -- Consolidated Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; background: #f5f5f7; color: #1d1d1f; }
h1 { padding: 1.8rem 2rem 1rem; font-size: 22px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; margin-bottom: 1rem; }
label { display: block; font-size: 12px; font-weight: 600; color: #6e6e73; margin-bottom: 4px; }
a { color: #2997ff; }
nav { background: #1d1d1f; padding: 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0; align-items: center; }
nav a { color: #ffffffb3; text-decoration: none; padding: 0.85rem 0.95rem; font-size: 12.5px; display: inline-block; border-bottom: 3px solid transparent; white-space: nowrap; }
nav a:hover { color: #fff; }
nav a.active { color: #fff; border-bottom-color: #2997ff; }
#dark-toggle { margin-left: auto; background: none; border: none; color: #ffffffb3; cursor: pointer; padding: 1rem 1.2rem; font-size: 16px; }
#dark-toggle:hover { color: #fff; }
.nav-signout { margin-left: 8px; background: none; border: 1px solid #ffffff30; border-radius: 6px; color: #ffffffb3; cursor: pointer; padding: 6px 12px; font-size: 12px; font-family: inherit; }
.nav-signout:hover { color: #fff; border-color: #ffffff60; }

.card { background: #fff; border-radius: 12px; padding: 1.4rem 1.6rem; margin: 0 2rem 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.card-title { font-size: 14px; font-weight: 700; color: #1d1d1f; margin-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; }
.detail-card, .settings-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 1.4rem 1.6rem; }
.settings-card h2 { font-size: 15px; font-weight: 700; color: #1d1d1f; margin-bottom: 1rem; }
.form-card { background: #fff; border-radius: 12px; padding: 1.4rem 1.6rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); border-left: 3px solid #2997ff; margin-bottom: 1rem; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0 2rem 1.2rem; }
.conn-card { background: #fff; border-radius: 12px; padding: 1.2rem 1.4rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); border-left: 4px solid #d2d2d7; }
.conn-card.ok { border-left-color: #34c759; } .conn-card.warn { border-left-color: #f59e0b; } .conn-card.err { border-left-color: #ff3b30; }
.conn-name { font-size: 12px; font-weight: 600; color: #6e6e73; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.conn-state { font-size: 18px; font-weight: 700; }
.conn-sub { font-size: 11px; color: #6e6e73; margin-top: 4px; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-ok, .dot-green { background: #34c759; } .dot-warn, .dot-yellow { background: #f59e0b; } .dot-err, .dot-red { background: #ff3b30; } .dot-grey, .dot-gray { background: #aeaeb2; }
.badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.badge-green, .badge-success, .badge-ok { background: #e8f8ed; color: #1a7f1a; }
.badge-red, .badge-failed, .badge-error, .badge-overdue { background: #ffeeed; color: #c0392b; }
.badge-yellow, .badge-warn { background: #fff8e1; color: #92400e; }
.badge-blue, .badge-info { background: #e6f2ff; color: #0055cc; }
.badge-orange { background: #fff3e0; color: #b45309; }
.badge-gray, .badge-pending { background: #f0f0f5; color: #6e6e73; }
.badge-partial { background: #fff3e0; color: #b45309; }
.badge-soon { background: #fff8e1; color: #b45309; }
.badge-future { background: #e8f8ed; color: #1a7f1a; }
.badge-airbnb { background: #ffe0e0; color: #c0392b; }
.badge-vrbo { background: #deeeff; color: #0055cc; }
.badge-booking { background: #fff0d0; color: #b45309; }
.badge-google { background: #e8f8e8; color: #1a7f1a; }
.badge-owner { background: #fff3e0; color: #b45309; }
.badge-platform { background: #e8f4e8; color: #1a7f1a; }
.badge-mysite { background: #ede0ff; color: #6c3db0; }
.badge-direct { background: #f0f0f5; color: #555; }
.badge-other { background: #e5e5ea; color: #555; }
.badge-deduct { background: #e8f8ed; color: #1a7f1a; }
.badge-nodeduct { background: #f2f2f7; color: #6e6e73; }
.badge-active { background: #e8f8ed; color: #1a7f1a; }
.badge-inactive { background: #f2f2f7; color: #6e6e73; }
.badge-plumbing { background: #e8f4ff; color: #1561b0; }
.badge-electrical { background: #fff8e1; color: #8a6400; }
.badge-hvac { background: #f0f0ff; color: #4040cc; }
.badge-appliance { background: #e8ffe8; color: #1a7f1a; }
.badge-cleaning { background: #fff0f5; color: #cc3366; }
.badge-general { background: #f2f2f7; color: #636366; }
.badge-urgent { background: #fff0ef; color: #ff3b30; }
.badge-high { background: #fff5e8; color: #c75000; }
.badge-normal { background: #f2f2f7; color: #636366; }
.badge-low { background: #f2f2f7; color: #aeaeb2; }
.badge-open { background: #fff0ef; color: #ff3b30; }
.badge-in_progress { background: #fff8e1; color: #8a6400; }
.badge-resolved { background: #e8f8ed; color: #1a7f1a; }
.badge-vip { background: #fff3e0; color: #b45309; }
.badge-tag { background: #f2f2f7; color: #6e6e73; }
.badge-repeat { background: #e8f8ed; color: #1a7f1a; }
.badge-channel { background: #e8f4ff; color: #1561b0; }
.tag-owner { color: #b45309; font-weight: 600; font-size: 12px; }
.tag-platform { color: #1a7f1a; font-weight: 600; font-size: 12px; }
.cat-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; text-transform: capitalize; white-space: nowrap; }
.cat-checkin { background: #e8f8ed; color: #1a7f1a; } .cat-checkout { background: #e8f4ff; color: #1561b0; }
.cat-maintenance { background: #fff3e0; color: #b45309; } .cat-messaging { background: #f3e8ff; color: #7c3aed; }
.cat-general { background: #f2f2f7; color: #6e6e73; }
.bpill-pending { background: #fff3e0; color: #b45309; }
.bpill-approved { background: #dbeafe; color: #1e40af; }
.bpill-recorded_manual { background: #eef3ff; color: #3b5bcc; }
.bpill-verified_external { background: #e8f8ed; color: #1a7f1a; }
.bpill-discarded { background: #f2f2f7; color: #aeaeb2; }

.method-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; min-width: 44px; text-align: center; flex-shrink: 0; margin-top: 1px; }
.method-GET { background: #f0f0f5; color: #444; } .method-POST { background: #e6f2ff; color: #0055cc; } .method-DELETE { background: #ffeeed; color: #c0392b; }
.issue-badge { display: inline-block; background: #ffeeed; color: #c0392b; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin: 3px 4px 3px 0; }
.no-issues { display: inline-block; background: #e8f8ed; color: #1a7f1a; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.tab-bar, .page-tabs, .cat-tabs, .filter-tabs { display: flex; gap: 0; margin: 0 2rem 1.2rem; border-bottom: 1px solid #e5e5ea; }
.tab-btn, .page-tab, .cat-tab, .filter-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 18px; font-size: 13px; font-weight: 600; color: #6e6e73; cursor: pointer; margin-bottom: -1px; font-family: inherit; transition: color 0.15s, border-color 0.15s; }
.tab-btn.active, .page-tab.active, .cat-tab.active, .filter-tab.active { color: #2997ff; border-bottom-color: #2997ff; }
.tab-btn:hover:not(.active), .page-tab:hover:not(.active), .cat-tab:hover:not(.active), .filter-tab:hover:not(.active) { color: #1d1d1f; }
.tab-panel { display: none; margin: 0 2rem 2rem; } .tab-panel.active { display: block; }

.btn-primary { background: #2997ff; color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-primary:hover { background: #0a84ff; } .btn-primary:disabled { opacity: .4; cursor: default; }
.btn-secondary { background: #f0f0f5; color: #1d1d1f; border: none; border-radius: 8px; padding: 9px 20px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-secondary:hover { background: #e0e0e8; } .btn-secondary:disabled { opacity: .4; cursor: default; }
.btn-sm { background: #f0f0f5; border: none; border-radius: 6px; padding: 5px 11px; font-size: 12px; cursor: pointer; color: #1d1d1f; font-weight: 500; font-family: inherit; }
.btn-sm:hover { background: #e0e0e8; }
.btn-danger { background: none; color: #ff3b30; border: 1px solid #ff3b30; border-radius: 8px; padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-danger:hover { background: #fff0ef; }
.btn-approve { background: #34c759; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-approve:hover { background: #28a745; }
.btn-sent { background: #2997ff; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-sent:hover { background: #0a84ff; }
.btn-save { background: #34c759; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-save:hover { background: #28a745; }
.btn-save-sm { background: #2997ff; color: #fff; border: none; border-radius: 7px; padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 8px; font-family: inherit; }
.btn-save-sm:hover { background: #0a84ff; }
.btn-cancel { background: #f0f0f5; color: #1d1d1f; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-cancel:hover { background: #e0e0e8; }
.btn-discard { background: #fff0ef; color: #ff3b30; border: none; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-discard:hover { background: #ffd5d3; }
.btn-icon { background: none; border: 1px solid #e5e5ea; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: #3a3a3c; font-weight: 500; font-family: inherit; }
.btn-icon:hover { background: #f2f2f7; } .btn-icon.danger:hover { background: #ffeeed; color: #c0392b; border-color: #ffc9c7; }
.btn-edit { color: #2997ff; background: none; border: none; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.btn-edit:hover { background: #e8f4ff; }
.btn-delete { color: #ff3b30; background: none; border: none; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.btn-delete:hover { background: #fff0ef; }
.nav-btn { background: #f2f2f7; border: none; border-radius: 8px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: #1d1d1f; font-family: inherit; }
.nav-btn:hover { background: #e5e5ea; }
.refresh-btn { background: none; border: 1px solid #d2d2d7; border-radius: 8px; padding: .4rem .9rem; font-size: 12px; cursor: pointer; color: #555; font-family: inherit; }
.refresh-btn:hover { background: #f0f0f5; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; font-size: 11px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid #e5e5ea; }
tbody td { padding: 9px 10px; border-bottom: 1px solid #f2f2f7; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #f9f9fb; }
input[type=date], input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea { border: 1px solid #d2d2d7; border-radius: 8px; padding: 7px 10px; font-size: 14px; font-family: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #2997ff; }
input[type=date] { width: 160px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: 11px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.4px; }
.form-group input, .form-group select, .form-group textarea { border: 1px solid #d2d2d7; border-radius: 8px; padding: 7px 9px; font-size: 13px; font-family: inherit; outline: none; width: 100%; box-sizing: border-box; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #2997ff; }
.form-group textarea { min-height: 80px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.form-full { grid-column: 1 / -1; }
.form-input, .form-select, .form-textarea { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #2997ff; }
.form-textarea { min-height: 80px; resize: vertical; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.checkbox-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.checkbox-row label { font-size: 13px; color: #1d1d1f; text-transform: none; letter-spacing: 0; }
.search-input { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
.search-input:focus { border-color: #2997ff; }
.notes-textarea { width: 100%; min-height: 100px; border: 1px solid #d2d2d7; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none; resize: vertical; box-sizing: border-box; }
.notes-textarea:focus { border-color: #2997ff; }
.tags-input { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
.tags-input:focus { border-color: #2997ff; }
.receipt-textarea { width: 100%; min-height: 200px; border: 1px solid #d2d2d7; border-radius: 10px; padding: 12px; font-size: 13px; font-family: inherit; outline: none; resize: vertical; box-sizing: border-box; }
.receipt-textarea:focus { border-color: #2997ff; }
.copy-output-area { width: 100%; min-height: 180px; border: 1px solid #d2d2d7; border-radius: 8px; padding: 12px; font-size: 13px; font-family: inherit; line-height: 1.65; resize: vertical; box-sizing: border-box; background: #fff; color: #1d1d1f; }
.copy-output-area:focus { outline: none; border-color: #2997ff; }
.draft-body-edit { width: 100%; background: #f9f9fb; border: 1px solid #2997ff; border-radius: 8px; padding: 1rem; font-size: 13px; line-height: 1.6; min-height: 160px; resize: vertical; font-family: inherit; box-sizing: border-box; }

.filter-bar { display: flex; gap: 8px; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
.filter-bar select, .filter-bar input { border: 1px solid #d2d2d7; border-radius: 8px; padding: 6px 10px; font-size: 13px; font-family: inherit; outline: none; }
.filter-bar select:focus, .filter-bar input:focus { border-color: #2997ff; }
.ctrl-bar { display: flex; align-items: flex-end; gap: 1rem; padding: 0 2rem 1.4rem; flex-wrap: wrap; }
.ctrl-group { display: flex; flex-direction: column; gap: 4px; }
.ctrl-group label { font-size: 11px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: .4px; }
.ctrl-group select { border: 1px solid #d2d2d7; border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; background: #fff; min-width: 110px; outline: none; }
.ctrl-group select:focus { border-color: #2997ff; }
.ctrl-divider { width: 1px; height: 36px; background: #e5e5ea; align-self: flex-end; margin: 0 .2rem; }
.controls-row { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.controls-row .form-group { display: flex; flex-direction: column; gap: 4px; }
.add-form { background: #f9f9fb; border: 1px solid #e5e5ea; border-radius: 12px; padding: 1.2rem 1.4rem; margin-bottom: 1.2rem; }
.add-form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title { font-size: 15px; font-weight: 700; color: #1d1d1f; margin: 0 0 .9rem; }
.top-bar { display: flex; align-items: center; justify-content: space-between; margin: 0 2rem 0.8rem; }
.top-bar-left { font-size: 13px; color: #6e6e73; }
.hint { font-size: 12px; color: #6e6e73; margin: 4px 0 10px; }
.status-msg { font-size: 13px; color: #6e6e73; margin-top: 8px; }
.status-err { color: #ff3b30; }
.hidden { display: none !important; }
.row { display: flex; align-items: flex-start; flex-wrap: wrap; }
.gap { gap: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.full-width { grid-column: 1 / -1; }

.stats-grid, .kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 0 2rem 1.2rem; }
.stat-card, .kpi-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 1.1rem 1.2rem; }
.stat-label, .kpi-label { font-size: 11px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.stat-value, .kpi-value { font-size: 22px; font-weight: 700; color: #1d1d1f; line-height: 1.2; }
.stat-sub, .kpi-sub { font-size: 11px; color: #aeaeb2; margin-top: 3px; }
.stat-card.green .stat-value, .kpi-green .kpi-value { color: #1a7f1a; }
.stat-card.red .stat-value, .kpi-red .kpi-value { color: #ff3b30; }
.stat-card.blue .stat-value, .kpi-blue .kpi-value { color: #2997ff; }
.stat-card.orange .stat-value, .kpi-orange .kpi-value { color: #b45309; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0 2rem 1.2rem; }
.summary-card { background: #fff; border-radius: 12px; padding: 1.2rem 1.4rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.summary-card.tax { border-left: 3px solid #f59e0b; }
.summary-label { font-size: 12px; font-weight: 600; color: #6e6e73; margin-bottom: 6px; }
.summary-value { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.summary-sub { font-size: 12px; color: #6e6e73; margin-top: 4px; }
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid #f2f2f7; border-radius: 10px; overflow: hidden; }
.stat-cell { padding: 0.9rem 1rem; text-align: center; border-right: 1px solid #f2f2f7; }
.stat-cell:last-child { border-right: none; }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.18); width: 680px; max-width: 95vw; max-height: 85vh; display: flex; flex-direction: column; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid #f2f2f7; }
.modal-header h3 { margin: 0; font-size: 16px; color: #1d1d1f; }
.modal-close { background: none; border: none; font-size: 20px; color: #6e6e73; cursor: pointer; padding: 0 4px; line-height: 1; }
.modal-close:hover { color: #1d1d1f; }
.modal-body { padding: 1.2rem 1.4rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 0.9rem 1.4rem; border-top: 1px solid #f2f2f7; display: flex; gap: 8px; justify-content: flex-end; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1rem; }
.modal-title { font-size: 16px; font-weight: 700; margin: 0 0 1.2rem; }
.modal-field { margin-bottom: 1rem; }
.modal-input { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
.modal-input:focus { border-color: #2997ff; }
.prompt-pre { background: #1d1d1f; color: #e8e8ed; border-radius: 10px; padding: 1.2rem 1.4rem; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 11.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 60vh; overflow-y: auto; }
.toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: #1d1d1f; color: #fff; padding: .65rem 1.2rem; border-radius: 10px; font-size: 13px; font-weight: 500; z-index: 1000; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #c0392b; }
.toast.success { background: #1a7f1a; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #e5e5ea; border-top-color: #2997ff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: middle; margin-right: 6px; }
.spinner-sm { width: 12px; height: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { color: #aeaeb2; font-size: 13px; padding: 1.5rem 0; text-align: center; }
.empty-state { padding: 2.5rem 1rem; color: #aeaeb2; text-align: center; font-size: 13px; }
.empty-detail { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 3rem 2rem; text-align: center; color: #aeaeb2; font-size: 14px; }
.empty-list { padding: 1.5rem 1rem; text-align: center; color: #aeaeb2; font-size: 13px; }
.skeleton { background: linear-gradient(90deg, #f0f0f5 25%, #e8e8ed 50%, #f0f0f5 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; height: 16px; margin: 4px 0; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.advisory { background: #fffbeb; border: 1px solid #f59e0b; border-radius: 12px; }
.advisory strong { color: #92400e; } .advisory ul { margin-top: 8px; padding-left: 1.2rem; } .advisory li { color: #78350f; font-size: 13px; margin-bottom: 4px; }
.notice { font-size: 12px; padding: 6px 10px; border-radius: 6px; margin-bottom: .8rem; }
.notice-yellow { background: #fef3c7; color: #92400e; border-left: 3px solid #f59e0b; }
.notice-green { background: #f0fdf4; color: #16a34a; border-left: 3px solid #34c759; }
.notice-blue { background: #eff6ff; color: #0055cc; border-left: 3px solid #2997ff; }
.tax-info-box { background: #fffbeb; border: 1px solid #f59e0b; border-radius: 8px; padding: 1rem 1.1rem; font-size: 13px; line-height: 1.6; color: #78350f; }
.tax-info-box strong { color: #92400e; display: block; margin-bottom: .4rem; }
.dpos { color: #16a34a; font-weight: 600; } .dneg { color: #dc2626; font-weight: 600; } .dzero { color: #aeaeb2; }
.channel-grid { display: flex; flex-direction: column; gap: 6px; }
.channel-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #f9f9fb; border-radius: 8px; cursor: pointer; user-select: none; }
.channel-item input { margin: 0; width: 16px; height: 16px; cursor: pointer; accent-color: #2997ff; }
.ch-name { font-weight: 500; flex: 1; } .ch-count { font-size: 12px; color: #6e6e73; }
.ch-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.ch { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.ch-airbnb { background: #ffe0e0; color: #c0392b; } .ch-vrbo { background: #deeeff; color: #0055cc; }
.ch-booking { background: #fff0d0; color: #b45309; } .ch-google { background: #e8f8e8; color: #1a7f1a; }
.ch-mysite { background: #ede0ff; color: #6c3db0; } .ch-direct { background: #f0f0f5; color: #555; }
.running-total { display: flex; justify-content: flex-end; padding: 10px 0 4px; font-size: 13px; font-weight: 600; color: #1d1d1f; border-top: 1px solid #f2f2f7; margin-top: 4px; }

.accordion-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; background: #f5f5f7; border-radius: 8px; cursor: pointer; user-select: none; font-weight: 600; font-size: 13px; }
.accordion-header:hover { background: #e8e8ed; }
.accordion-header .chevron { font-size: 10px; color: #6e6e73; transition: transform .2s; }
.accordion-header.open .chevron { transform: rotate(180deg); }
.accordion-body { display: none; border: 1px solid #e5e5ea; border-top: none; border-radius: 0 0 8px 8px; overflow: hidden; }
.accordion-body.open { display: block; }
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 240px); min-height: 400px; }
.chat-history { flex: 1; overflow-y: auto; background: #f5f5f7; border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .75rem; margin-bottom: .9rem; }
.chat-msg { max-width: 80%; padding: .65rem .95rem; border-radius: 12px; font-size: 13.5px; line-height: 1.55; word-break: break-word; }
.chat-msg.user { align-self: flex-end; background: #2997ff; color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant { align-self: flex-start; background: #fff; color: #1d1d1f; box-shadow: 0 1px 3px rgba(0,0,0,.1); border-bottom-left-radius: 4px; }
.chat-msg.thinking { align-self: flex-start; background: #fff; color: #aeaeb2; font-style: italic; font-size: 13px; }
.chat-input-row { display: flex; gap: .6rem; }
.chat-input { flex: 1; border: 1px solid #d2d2d7; border-radius: 10px; padding: .65rem .9rem; font-size: 14px; outline: none; font-family: inherit; resize: none; height: 42px; max-height: 120px; overflow-y: auto; }
.chat-input:focus { border-color: #2997ff; }
.chat-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.chat-chip { background: #fff; border: 1px solid #d2d2d7; border-radius: 20px; padding: .3rem .85rem; font-size: 12px; cursor: pointer; color: #1d1d1f; font-weight: 500; transition: background .15s; font-family: inherit; }
.chat-chip:hover { background: #e8f2ff; border-color: #2997ff; color: #2997ff; }
.chat-empty { text-align: center; color: #aeaeb2; font-size: 13px; padding: 2rem; }
.cal-controls { display: flex; align-items: center; gap: 1rem; margin: 0 2rem 1.4rem; flex-wrap: wrap; }
.cal-period-label { font-size: 14px; font-weight: 600; color: #1d1d1f; flex: 1; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #6e6e73; font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.dot-available { background: #34c759; } .dot-booked { background: #2997ff; } .dot-checkin { background: #5ac8fa; } .dot-checkout { background: #ff9500; }
.months-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; padding: 0 2rem; }
.month-block { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 1.2rem; overflow: hidden; }
.month-title { font-size: 15px; font-weight: 700; color: #1d1d1f; margin-bottom: .9rem; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dow-header { font-size: 10px; font-weight: 700; color: #aeaeb2; text-align: center; padding: 3px 0; text-transform: uppercase; }
.cal-day { position: relative; border-radius: 6px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: #1d1d1f; cursor: default; }
.cal-day.day-available { background: #e8f8ed; color: #1a7f1a; }
.cal-day.day-booked { background: #e8f4ff; color: #1561b0; }
.cal-day.day-checkin { background: #e0f7ff; color: #007aaf; }
.cal-day.day-checkout { background: #fff5e8; color: #c75000; }
.cal-day.day-empty { background: transparent; }
.cal-day.day-today { outline: 2px solid #2997ff; outline-offset: -2px; font-weight: 700; }
.cal-day[data-tip] { cursor: pointer; }
.cal-day[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: rgba(29,29,31,.9); color: #fff; font-size: 11px; white-space: nowrap; padding: 5px 9px; border-radius: 7px; z-index: 100; pointer-events: none; }
.cal-day[data-tip]:hover::before { content: ''; position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: rgba(29,29,31,.9); z-index: 101; }
.month-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; padding-top: .8rem; border-top: 1px solid #f2f2f7; }
.sum-item { text-align: center; } .sum-value { font-size: 16px; font-weight: 700; color: #1d1d1f; }
.sum-label { font-size: 10px; color: #6e6e73; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }

.calendar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.4rem; }
.cal-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 1rem 1.2rem; }
.cal-month { font-size: 12px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.cal-item { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #f2f2f7; font-size: 12px; }
.cal-item:last-child { border-bottom: none; }
.cal-item-label { color: #1d1d1f; font-weight: 500; } .cal-item-amount { color: #6e6e73; } .cal-item-due { color: #aeaeb2; font-size: 11px; }
.crm-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.2rem; margin: 0 2rem 2rem; align-items: start; }
.guest-list-panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.guest-list-header { padding: 0.9rem 1rem 0.7rem; border-bottom: 1px solid #f2f2f7; }
.guest-list-body { max-height: calc(100vh - 200px); overflow-y: auto; }
.guest-row { padding: 0.75rem 1rem; border-bottom: 1px solid #f2f2f7; cursor: pointer; transition: background 0.1s; }
.guest-row:last-child { border-bottom: none; } .guest-row:hover { background: #f9f9fb; } .guest-row.active { background: #e8f4ff; }
.guest-row-name { font-size: 13px; font-weight: 600; color: #1d1d1f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-row-email { font-size: 12px; color: #6e6e73; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.guest-row-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.guest-row-date { font-size: 11px; color: #aeaeb2; } .guest-row-count { font-size: 11px; color: #6e6e73; font-weight: 500; }
.guest-detail-panel { display: flex; flex-direction: column; gap: 1rem; }
.detail-name { font-size: 20px; font-weight: 700; color: #1d1d1f; margin-bottom: 2px; }
.detail-email { font-size: 13px; color: #6e6e73; margin-bottom: 10px; }
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0; }
.drafts-layout { display: grid; grid-template-columns: 340px 1fr; gap: 1.2rem; margin: 0 2rem 1.2rem; align-items: start; }
.panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.panel-header { padding: 1rem 1.2rem 0.8rem; border-bottom: 1px solid #f2f2f7; }
.draft-list { max-height: 65vh; overflow-y: auto; }
.draft-item { padding: 0.9rem 1.2rem; border-bottom: 1px solid #f2f2f7; cursor: pointer; transition: background 0.12s; }
.draft-item:last-child { border-bottom: none; } .draft-item:hover { background: #f9f9fb; } .draft-item.selected { background: #e8f4ff; }
.draft-guest { font-weight: 600; font-size: 13px; } .draft-meta { font-size: 11px; color: #6e6e73; margin-top: 2px; }
.draft-preview { font-size: 12px; color: #6e6e73; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-panel { padding: 1.4rem 1.6rem; }
.detail-label { font-size: 11px; font-weight: 600; color: #6e6e73; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.detail-value { font-size: 14px; margin-bottom: 1rem; }
.draft-body-view { background: #f9f9fb; border-radius: 8px; padding: 1rem; font-size: 13px; line-height: 1.6; white-space: pre-wrap; min-height: 120px; }
.action-row { display: flex; gap: 8px; margin-top: 1rem; flex-wrap: wrap; }
.generate-card { margin: 0 2rem 1.2rem; }
.gen-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.gen-full { grid-column: 1 / -1; }
.gen-input, .gen-select, .gen-textarea { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: inherit; outline: none; box-sizing: border-box; }
.gen-input:focus, .gen-select:focus, .gen-textarea:focus { border-color: #2997ff; }
.gen-textarea { min-height: 80px; resize: vertical; }

.sop-list { margin: 0 2rem 1.2rem; display: flex; flex-direction: column; gap: 0.8rem; }
.sop-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.sop-card.inactive { opacity: 0.65; }
.sop-card-header { display: flex; align-items: center; gap: 10px; padding: 0.9rem 1.2rem 0.75rem; flex-wrap: wrap; }
.sop-title { font-size: 16px; font-weight: 700; color: #1d1d1f; flex: 1; min-width: 120px; }
.sop-version { font-size: 12px; color: #6e6e73; font-weight: 500; white-space: nowrap; }
.sop-updated { font-size: 12px; color: #aeaeb2; white-space: nowrap; }
.sop-preview { padding: 0 1.2rem 0.4rem; font-size: 13px; color: #6e6e73; line-height: 1.5; }
.sop-expand-link { display: inline-block; margin: 0 1.2rem 0.6rem; font-size: 12px; font-weight: 600; color: #2997ff; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }
.sop-expand-link:hover { text-decoration: underline; }
.sop-full-content { margin: 0 1.2rem 0.6rem; background: #f9f9fb; border-radius: 8px; padding: 0.8rem 1rem; font-size: 13px; font-family: 'SF Mono', 'Menlo', 'Consolas', monospace; line-height: 1.6; white-space: pre-wrap; color: #1d1d1f; }
.sop-actions { display: flex; gap: 8px; padding: 0.5rem 1.2rem 0.9rem; align-items: center; }
.sop-inactive-badge { font-size: 11px; font-weight: 600; color: #aeaeb2; margin-left: 4px; }
.sop-form-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); padding: 1.4rem 1.6rem; border-left: 3px solid #2997ff; margin-bottom: 0.8rem; }
.sop-form-card h2 { margin-bottom: 1rem; }
.form-grid-sop { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.main-layout { display: grid; grid-template-columns: 200px 1fr; gap: 1.4rem; padding: 0 2rem 2rem; }
.log-list { display: flex; flex-direction: column; gap: .8rem; }
.entry-card { background: #fff; border-radius: 12px; padding: 1.1rem 1.3rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); cursor: pointer; border-left: 4px solid #e5e5ea; transition: box-shadow .15s; }
.entry-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.entry-card.priority-urgent { border-left-color: #ff3b30; } .entry-card.priority-high { border-left-color: #ff9500; }
.entry-card.priority-normal { border-left-color: #2997ff; } .entry-card.priority-low { border-left-color: #aeaeb2; }
.entry-header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.entry-title { font-size: 14px; font-weight: 600; color: #1d1d1f; flex: 1; }
.entry-meta { font-size: 11px; color: #6e6e73; margin-top: .4rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.entry-detail { display: none; margin-top: .9rem; padding-top: .9rem; border-top: 1px solid #f2f2f7; font-size: 13px; color: #3a3a3c; }
.entry-detail.open { display: block; }
.detail-row { display: flex; gap: .5rem; margin-bottom: .4rem; }
.detail-label { font-weight: 600; color: #6e6e73; min-width: 130px; font-size: 12px; }
.toolbar { display: flex; align-items: center; gap: 1rem; padding: 0 2rem 1.2rem; }
.comp-table-wrap { margin: 0 2rem; background: #fff; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.08); overflow: hidden; }
.comp-name { font-weight: 600; color: #1d1d1f; }
.comp-url a { color: #2997ff; text-decoration: none; font-size: 12px; word-break: break-all; }
.comp-url a:hover { text-decoration: underline; } .comp-notes { color: #6e6e73; font-size: 12px; max-width: 240px; }
.row-actions { display: flex; gap: 6px; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.toggle-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.field-row { display: flex; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #f2f2f7; }
.field-row:last-child { border-bottom: none; }
.field-label { font-size: 12px; font-weight: 600; color: #6e6e73; min-width: 160px; flex-shrink: 0; }
.field-value { font-size: 14px; color: #1d1d1f; }
.status-row { display: flex; align-items: center; gap: .6rem; padding: 6px 0; border-bottom: 1px solid #f2f2f7; font-size: 13px; }
.status-row:last-child { border-bottom: none; }
.status-label { color: #6e6e73; font-size: 12px; font-weight: 600; min-width: 160px; flex-shrink: 0; }
.quick-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .7rem; margin-top: .2rem; }
.ql-link { display: flex; align-items: center; justify-content: center; background: #f5f5f7; border-radius: 8px; padding: .7rem .5rem; font-size: 12px; font-weight: 600; color: #1d1d1f; text-decoration: none; text-align: center; transition: background .12s; }
.ql-link:hover { background: #e5e5ea; color: #1d1d1f; }

.tf-section { background: #fff; border-radius: 14px; padding: 1.3rem 1.6rem; margin: 0 2rem 1.2rem; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tf-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; padding-bottom: .65rem; border-bottom: 1px solid #f2f2f7; }
.tf-title { font-size: 14px; font-weight: 700; color: #1d1d1f; } .tf-subtitle { font-size: 11.5px; color: #6e6e73; margin-top: 3px; line-height: 1.4; max-width: 780px; } .tf-actions { display: flex; gap: .5rem; align-items: center; }
.logic-badge { display: inline-block; font-size: 10.5px; font-weight: 700; color: #0055cc; background: #e6f2ff; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.obligation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.obligation-panel { border: 1px solid #e5e5ea; border-radius: 10px; padding: .95rem 1rem; min-width: 0; background: #fbfbfd; }
.obligation-title { font-size: 13px; font-weight: 700; color: #1d1d1f; }
.obligation-sub { font-size: 11px; color: #6e6e73; margin: 2px 0 .7rem; }
.obligation-footnote { font-size: 11px; color: #6e6e73; line-height: 1.45; margin-top: .55rem; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.payment-fields { display: flex; flex-direction: column; gap: .45rem; margin-top: .65rem; }
.payment-field-card { border: 1px solid #e5e5ea; border-radius: 8px; background: #fff; overflow: hidden; }
.payment-field-card summary { cursor: pointer; list-style: none; padding: .55rem .7rem; font-size: 12px; font-weight: 700; color: #1d1d1f; background: #f5f5f7; }
.payment-field-card summary::-webkit-details-marker { display: none; }
.payment-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #f2f2f7; }
.payment-field { background: #fff; padding: .55rem .7rem; min-width: 0; }
.payment-field-label { font-size: 10.5px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: .25px; line-height: 1.35; }
.payment-field-value { font-size: 13px; font-weight: 650; color: #1d1d1f; margin-top: 2px; word-break: break-word; font-variant-numeric: tabular-nums; }
.payment-entry-form { border-top: 1px solid #e5e5ea; padding: .75rem; background: #fbfbfd; }
.payment-form-title { font-size: 12px; font-weight: 700; color: #1d1d1f; margin-bottom: .55rem; }
.payment-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.payment-form-grid label { font-size: 10.5px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: .25px; margin: 0; }
.payment-form-grid input, .payment-form-grid select, .payment-form-grid textarea { width: 100%; margin-top: 3px; padding: 6px 8px; font-size: 12px; border-radius: 7px; }
.payment-form-notes { grid-column: 1 / -1; }
.payment-form-actions { display: flex; align-items: center; gap: .75rem; margin-top: .65rem; }
.payment-form-actions .btn-primary { padding: 7px 14px; font-size: 12px; border-radius: 7px; }
.payment-save-state { font-size: 11px; color: #6e6e73; }
.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dt th { text-align: left; padding: 6px 10px; background: #f5f5f7; font-weight: 600; color: #6e6e73; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.dt th:not(:first-child) { text-align: right; }
.dt td { padding: 7px 10px; border-bottom: 1px solid #f5f5f7; }
.dt td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.dt tr:last-child td { border-bottom: none; } .dt tr:hover td { background: #f9f9fb; }
.dt .tr-total td { font-weight: 700; background: #f5f5f7 !important; } .dt .tr-platform td { color: #aeaeb2; }
.wi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.wi-card { border-radius: 10px; padding: 1.2rem 1.3rem; border: 1.5px solid #e5e5ea; }
.wi-card.verified { border-color: #34c759; background: #f6fff7; } .wi-card.manual { border-color: #2997ff; background: #f4f8ff; }
.wi-card-title { font-size: 13px; font-weight: 700; margin-bottom: .6rem; }
.wi-card.verified .wi-card-title { color: #1a7f1a; } .wi-card.manual .wi-card-title { color: #0055cc; }
.wi-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f2f2f7; font-size: 12.5px; }
.wi-toggle-row:last-of-type { border-bottom: none; }
.wi-toggle-row select { font-size: 12px; padding: 3px 8px; border: 1px solid #d2d2d7; border-radius: 6px; font-family: inherit; background: #fff; }
.wi-kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0; }
.wi-kpi { background: rgba(0,0,0,.03); border-radius: 8px; padding: .55rem .8rem; }
.wi-kpi-l { font-size: 10px; font-weight: 600; color: #6e6e73; text-transform: uppercase; margin-bottom: .2rem; }
.wi-kpi-v { font-size: 16px; font-weight: 700; }
.chart-wrap { position: relative; height: 170px; margin-bottom: .8rem; }
.chart-wrap-sm { position: relative; height: 140px; }
.schedule-e-pre { white-space: pre; font-family: 'Courier New', Courier, monospace; font-size: 12px; line-height: 1.6; color: #1d1d1f; background: #f9f9fb; border-radius: 8px; padding: 1rem; overflow-x: auto; }
.page-result { border: 1px solid #e5e5ea; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; }
.page-result:last-child { margin-bottom: 0; }
.page-url { font-size: 12px; font-weight: 700; color: #2997ff; margin-bottom: 6px; word-break: break-all; }
.page-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.page-meta { font-size: 12px; color: #6e6e73; font-style: italic; margin-bottom: 8px; }
.page-body { font-size: 13px; color: #1d1d1f; line-height: 1.55; max-height: 200px; overflow-y: auto; white-space: pre-wrap; background: #f9f9fb; border-radius: 6px; padding: 10px; }
.analysis-output { font-size: 13px; line-height: 1.65; white-space: pre-wrap; max-height: 420px; overflow-y: auto; background: #f9f9fb; border-radius: 8px; padding: 1.2rem; color: #1d1d1f; }

.kbd { display: inline-block; background: #f0f0f5; border: 1px solid #d2d2d7; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-family: 'SF Mono', Menlo, monospace; color: #6e6e73; line-height: 1.6; box-shadow: 0 1px 0 #d2d2d7; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; padding: 0 2rem 2rem; }
.scanner-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.before-after-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; color: #6e6e73; }
.before-after-label.after-label { color: #2997ff; }
.sidebar { display: flex; flex-direction: column; gap: .8rem; }
.sidebar h3 { font-size: 12px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 .3rem; }
.pill-group { display: flex; flex-direction: column; gap: 4px; }
.filter-pill { background: none; border: 1px solid #e5e5ea; border-radius: 20px; padding: 5px 12px; font-size: 12px; font-weight: 600; color: #6e6e73; cursor: pointer; text-align: left; transition: background .15s, color .15s; font-family: inherit; }
.filter-pill.active { background: #2997ff; color: #fff; border-color: #2997ff; }
.filter-pill:hover:not(.active) { background: #f2f2f7; }
.cat-select { width: 100%; border: 1px solid #d2d2d7; border-radius: 8px; padding: 7px 10px; font-size: 12px; font-family: inherit; outline: none; }
.cat-select:focus { border-color: #2997ff; }
.edit-row input, .edit-row select { border: 1px solid #2997ff; border-radius: 6px; padding: 4px 7px; font-size: 12px; font-family: inherit; outline: none; width: 100%; }
.changelog-table-wrap { overflow-x: auto; }
.future-features { background: #f9f9fb; border-radius: 10px; padding: 1rem 1.2rem; margin-top: 1.2rem; }
.future-features h4 { font-size: 12px; font-weight: 700; color: #6e6e73; text-transform: uppercase; letter-spacing: 0.5px; margin: 0 0 8px; }
.future-features ul { margin: 0; padding-left: 18px; font-size: 13px; color: #6e6e73; line-height: 1.8; }
.presets label { margin-bottom: 6px; }

@media (max-width: 1100px) { .stats-grid, .kpi-row { grid-template-columns: repeat(3, 1fr); } .wi-grid { grid-template-columns: 1fr; } .months-row { grid-template-columns: repeat(2, 1fr); } .obligation-grid { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } .calendar-grid { grid-template-columns: 1fr 1fr; } .crm-layout { grid-template-columns: 1fr; } .drafts-layout { grid-template-columns: 1fr; } .main-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  body { font-size: 13px; }
  h1 { padding: 1rem 1rem .8rem; font-size: 20px; }
  nav { padding: 0 .6rem; overflow-x: auto; flex-wrap: nowrap; align-items: stretch; }
  nav a { padding: .75rem .7rem; font-size: 12px; }
  #dark-toggle, .nav-signout { flex-shrink: 0; }
  .ctrl-bar { padding: 0 1rem 1rem; gap: .7rem; align-items: stretch; }
  .ctrl-group { flex: 1 1 145px; min-width: 0; }
  .ctrl-group select { width: 100%; min-width: 0; }
  .ctrl-divider { display: none; }
  .ctrl-bar .btn-primary, .ctrl-bar .btn-secondary { flex: 1 1 140px; padding: 9px 10px; }
  .stats-grid, .kpi-row { grid-template-columns: 1fr 1fr; gap: .7rem; margin: 0 1rem 1rem; }
  .kpi-card, .stat-card { padding: .9rem .95rem; border-radius: 10px; }
  .kpi-value, .stat-value { font-size: 18px; }
  .tf-section { margin: 0 1rem 1rem; padding: 1rem; border-radius: 10px; }
  .tf-section { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tf-hdr { align-items: flex-start; gap: .6rem; flex-direction: column; }
  .tf-actions { width: 100%; flex-wrap: wrap; }
  .tf-actions .btn-secondary, .tf-actions .tf-btn { flex: 1 1 130px; padding: 8px 10px; }
  .tf-subtitle { font-size: 11px; }
  .obligation-panel { padding: .85rem; }
  .payment-field-grid { grid-template-columns: 1fr; }
  .payment-form-grid { grid-template-columns: 1fr; }
  .payment-form-actions { align-items: stretch; flex-direction: column; gap: .4rem; }
  .dt { min-width: 620px; font-size: 12px; }
  .obligation-table { min-width: 540px; }
  .chart-wrap { height: 190px; }
  .chart-wrap-sm { height: 220px; }
  .wi-kpi-row { grid-template-columns: 1fr; }
  .wi-toggle-row { align-items: flex-start; gap: .5rem; flex-direction: column; }
  .wi-toggle-row select { width: 100%; }
  .toast { left: 1rem; right: 1rem; bottom: 1rem; text-align: center; }
  .months-row { grid-template-columns: 1fr; }
  .calendar-grid { grid-template-columns: 1fr; }
}

body.dark { background: #0d1117; color: #e6edf3; }
body.dark nav { background: #010409; border-bottom: 1px solid #30363d; }
body.dark a { color: #58a6ff; } body.dark nav a { color: #8b949e; } body.dark nav a:hover { color: #e6edf3; }
body.dark nav a.active { color: #e6edf3; border-bottom-color: #58a6ff; }
body.dark h2, body.dark label { color: #8b949e; }
body.dark .card, body.dark .panel, body.dark .detail-card, body.dark .settings-card, body.dark .tf-section,
body.dark .form-card, body.dark .kpi-card, body.dark .stat-card, body.dark .sop-card, body.dark .month-block,
body.dark .cal-card, body.dark .entry-card, body.dark .conn-card, body.dark .sop-form-card,
body.dark .tables-card, body.dark .status-card, body.dark .integration-card, body.dark .feature-card,
body.dark .comp-table-wrap { background: #161b22; box-shadow: 0 1px 4px rgba(0,0,0,.4); color: #e6edf3; }
body.dark table thead tr, body.dark .dt th { background: #21262d; color: #8b949e; }
body.dark table tbody tr:hover td, body.dark .dt tr:hover td { background: #1c2128; }
body.dark .dt .tr-total td { background: #21262d !important; }
body.dark .obligation-panel, body.dark .payment-field-card, body.dark .payment-field { background: #161b22; border-color: #30363d; }
body.dark .payment-field-card summary { background: #21262d; color: #e6edf3; }
body.dark .payment-field-grid { background: #30363d; }
body.dark .payment-field-value, body.dark .obligation-title { color: #e6edf3; }
body.dark .payment-entry-form { background: #0d1117; border-color: #30363d; }
body.dark .payment-form-title { color: #e6edf3; }
body.dark input, body.dark select, body.dark textarea,
body.dark .form-group input, body.dark .form-group select, body.dark .form-group textarea,
body.dark .form-input, body.dark .form-select, body.dark .form-textarea,
body.dark .search-input, body.dark .notes-textarea, body.dark .tags-input,
body.dark .receipt-textarea, body.dark .copy-output-area, body.dark .modal-input,
body.dark .gen-input, body.dark .gen-select, body.dark .gen-textarea,
body.dark .cat-select, body.dark .wi-toggle-row select,
body.dark .ctrl-group select, body.dark .filter-bar select, body.dark .filter-bar input,
body.dark .chat-input, body.dark .draft-body-edit { background: #21262d; color: #e6edf3; border-color: #30363d; }
body.dark input:focus, body.dark select:focus, body.dark textarea:focus { border-color: #58a6ff; }
body.dark .btn-sm, body.dark .btn-secondary { background: #21262d; color: #e6edf3; }
body.dark .btn-sm:hover, body.dark .btn-secondary:hover { background: #30363d; }
body.dark .btn-primary { background: #1f6feb; } body.dark .btn-primary:hover { background: #388bfd; }
body.dark .nav-btn { background: #21262d; color: #e6edf3; } body.dark .nav-btn:hover { background: #30363d; }
body.dark .btn-icon { border-color: #30363d; color: #8b949e; } body.dark .btn-icon:hover { background: #21262d; }
body.dark .refresh-btn { border-color: #30363d; color: #8b949e; }
body.dark .tab-bar, body.dark .page-tabs, body.dark .cat-tabs, body.dark .filter-tabs { border-bottom-color: #30363d; }
body.dark .tab-btn, body.dark .page-tab, body.dark .cat-tab, body.dark .filter-tab { color: #8b949e; }
body.dark .tab-btn.active, body.dark .page-tab.active, body.dark .cat-tab.active, body.dark .filter-tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }
body.dark .empty-state, body.dark .empty-detail, body.dark .empty-list, body.dark .loading, body.dark .chat-empty { color: #484f58; }
body.dark .hint, body.dark .status-msg, body.dark .summary-sub, body.dark .stat-sub, body.dark .kpi-sub, body.dark .conn-sub { color: #484f58; }
body.dark .detail-label, body.dark .field-label, body.dark .status-label { color: #8b949e; }
body.dark .draft-meta, body.dark .guest-row-date { color: #484f58; }
body.dark .filter-pill { border-color: #30363d; color: #8b949e; }
body.dark .filter-pill.active { background: #1f6feb; border-color: #1f6feb; color: #fff; }
body.dark .filter-pill:hover:not(.active) { background: #21262d; }
body.dark .advisory, body.dark .notice-yellow, body.dark .tax-info-box { background: #1c1200; }
body.dark .add-form { background: #161b22; border-color: #30363d; }
body.dark .channel-item { background: #161b22; }
body.dark .sop-full-content, body.dark .draft-body-view, body.dark .page-body,
body.dark .copy-box, body.dark .analysis-output, body.dark .schedule-e-pre, body.dark .prompt-pre { background: #0d1117; }
body.dark .notes-box { background: #1c1200; }
body.dark .ql-link { background: #21262d; color: #e6edf3; } body.dark .ql-link:hover { background: #30363d; }
body.dark .entry-card { border-left-color: #30363d; }
body.dark .entry-card.priority-urgent { border-left-color: #f85149; }
body.dark .entry-card.priority-high { border-left-color: #d29922; }
body.dark .entry-card.priority-normal { border-left-color: #1f6feb; }
body.dark .wi-card.verified { background: #0a180b; border-color: #238636; }
body.dark .wi-card.manual { background: #050e1e; border-color: #1f6feb; }
body.dark .wi-kpi { background: rgba(255,255,255,.05); }
body.dark .wi-toggle-row { border-bottom-color: #30363d; }
body.dark .cal-day.day-available { background: #0a2e0a; color: #3fb950; }
body.dark .cal-day.day-booked { background: #0a1e3a; color: #58a6ff; }
body.dark .cal-day.day-checkin { background: #0a2a3a; color: #79c0ff; }
body.dark .cal-day.day-checkout { background: #2a1a00; color: #d29922; }
body.dark .cal-day.day-today { outline-color: #58a6ff; }
body.dark .dot-ok, body.dark .dot-green { background: #3fb950; }
body.dark .dot-warn, body.dark .dot-yellow { background: #d29922; }
body.dark .dot-err, body.dark .dot-red { background: #f85149; }
body.dark .kbd { background: #21262d; border-color: #30363d; color: #8b949e; box-shadow: 0 1px 0 #30363d; }
body.dark .endpoint-note { background: #1c1200; color: #d29922; }
body.dark .used-by-tag { background: #0a1e3a; color: #58a6ff; }
body.dark .int-tag { background: #21262d; color: #8b949e; }
body.dark .skeleton { background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%); background-size: 200% 100%; }
body.dark .toast { background: #e6edf3; color: #0d1117; }
body.dark .toast.error { background: #f85149; color: #fff; }
body.dark .toast.success { background: #238636; color: #fff; }

/* Nav separators */
.nav-sep { display: inline-block; width: 1px; height: 20px; background: #ffffff15; margin: 0 4px; vertical-align: middle; }
body.dark .nav-sep { background: #ffffff10; }
