/* SHARED-INTEL-1: Intelligence on Room 2. Generated once from style-room0.css; same look as Room 0. */
body.shell-room2 {
    --r0-rail: #5aa3be;
    --r0-rail-deep: #3e8aa6;
    --r0-stage: var(--r2-stage);
    --r0-card: var(--r2-card);
    --r0-card-line: rgba(15, 70, 95, 0.12);
    --r0-ink: var(--r2-ink);
    --r0-muted: #3d5a6e;
    --r0-cta: #0f8a7a;
    --r0-cta-hover: #0c7367;
    --r0-pill: #e8f7fc;
    --r0-white: #ffffff;
}

/* Sale logs come with the Room 2 Försäljningslogg (step 4). */
body.shell-room2 #panel-new-log,
body.shell-room2 #panel-view-all-logs {
    display: none;
}

body.shell-room2,
body.shell-room2.intel-edit-open {
    overflow: hidden !important;
}

body.shell-room2 .r0-water .table-wrap,
body.shell-room2 .r0-water .corp-table-wrap,
body.shell-room2 .r0-water .table-scroll,
body.shell-room2 #intelligence-view,
body.shell-room2 #fakturering-view,
body.shell-room2 #inv-panel-list,
body.shell-room2 #inv-panel-list .table-wrap {
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

body.shell-room2 #intelligence-view #client-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
}

body.shell-room2 #intelligence-view #client-table col.col-w-actions,
body.shell-room2 #intelligence-view #client-table th.col-actions,
body.shell-room2 #intelligence-view #client-table td.col-actions {
    width: 176px;
    min-width: 176px;
    max-width: 176px;
    overflow: visible;
    white-space: nowrap;
    flex-shrink: 0;
}

body.shell-room2 #intelligence-view .search-bar {
    background: rgba(255, 255, 255, 0.45);
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
}

body.shell-room2 #intelligence-view .search-bar input {
    background: transparent;
    border: none;
    color: var(--r0-ink);
    border-radius: 999px;
}

body.shell-room2 #intelligence-view .period-filters {
    background: rgba(255, 255, 255, 0.45);
    border: none;
    border-radius: 18px;
}

body.shell-room2 #intelligence-view .table-wrap,
body.shell-room2 #intelligence-view .corp-table-wrap {
    background: var(--r0-card);
    border: none;
    border-radius: 18px;
    box-shadow: none;
}

body.shell-room2 #intelligence-view #client-table th {
    background: transparent;
    color: var(--r0-muted);
    letter-spacing: 0.04em;
}

body.shell-room2 #intelligence-view #client-table td {
    padding: 12px 14px;
}

body.shell-room2 #intelligence-view .intel-row-edit-btn,
body.shell-room2 #intelligence-view .intel-row-delete-btn,
body.shell-room2 #intelligence-view #client-new-btn {
    text-transform: none;
    letter-spacing: 0;
    border-radius: 999px;
    padding: 4px 12px;
}

body.shell-room2 #intelligence-view .intel-row-delete-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #b91c1c;
}

body.hotel-phone #intelligence-view #client-table col.col-w-phone,
body.hotel-phone #intelligence-view #client-table col.col-w-web,
body.hotel-phone #intelligence-view #client-table col.col-w-actions,
body.hotel-phone #intelligence-view #client-table .col-phone,
body.hotel-phone #intelligence-view #client-table .col-web,
body.hotel-phone #intelligence-view #client-table .col-actions {
    display: none;
}

body.shell-room2 .r0-intel-cust-wrap {
    position: relative;
}

body.shell-room2 #inv-cust-suggest {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 180px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

body.shell-room2 #inv-cust-suggest .address-suggestion {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
}

body.shell-room2 #inv-cust-suggest .address-suggestion:hover,
body.shell-room2 #inv-cust-suggest .address-suggestion:focus {
    background: #f1f5f9;
}

body.shell-room2 .r0-intel-cust-new {
    margin-top: 6px;
}

body.hotel-phone #inv-panel-editor #inv-cust-suggest {
    max-width: 100%;
}

body.hotel-phone #intel-row-edit-modal {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px;
}

body.hotel-phone #intel-row-edit-modal .intel-row-edit-modal {
    width: min(520px, 100%);
    max-width: 100%;
    max-height: calc(100dvh - 16px);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    box-sizing: border-box;
}

body.hotel-phone #intel-row-edit-modal .panel-grid {
    grid-template-columns: 1fr;
}

body.hotel-phone #intel-row-edit-modal input,
body.hotel-phone #intel-row-edit-modal textarea,
body.hotel-phone #intel-row-edit-modal select {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.shell-room2 #intelligence-view .search-bar,
body.shell-room2 #intelligence-view .period-filters,
body.shell-room2 #intelligence-view .table-wrap,
body.shell-room2 #intelligence-view .corp-table-wrap,
body.shell-room2 #intelligence-view .module-summary-stats,
body.shell-room2 #intelligence-view .stats {
    background: var(--r0-card);
    box-shadow: var(--r0-lift);
}

body.shell-room2 #intelligence-view .module-summary-stats,
body.shell-room2 #intelligence-view .stats {
    background: #fff;
}

body.shell-room2 #intelligence-view #client-table thead {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 3px 8px rgba(15, 30, 50, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 10px;
}

body.shell-room2 #intelligence-view #client-table th {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: var(--r0-muted);
}

body.shell-room2 #intelligence-view #client-table th.sort-active {
    box-shadow: inset 0 -2px 0 #1f598c;
}

body.shell-room2 #intelligence-view #period-month.period-select,
body.shell-room2 #intelligence-view #period-month.period-select:disabled {
    background: #c5e3ed;
    color: #3d5a6e;
    opacity: 1;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--r0-lift);
}

body.shell-room2 #intelligence-view #client-new-btn,
body.shell-room2 #intelligence-view #client-new-btn[hidden] {
    display: inline-flex !important;
    align-items: center;
    background: #c5e3ed;
    color: #3d5a6e;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--r0-lift);
    font-weight: 600;
}

body.shell-room2 #intelligence-view .intel-row-edit-btn,
body.shell-room2 #intelligence-view .intel-row-delete-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        0 2px 3px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

body.shell-room2 #intelligence-view .intel-row-edit-btn {
    background: #5aa3be;
}

body.shell-room2 #intelligence-view .intel-row-delete-btn {
    background: #e85a5a;
    color: #fff;
    border-color: rgba(255, 180, 180, 0.8);
}
