/* Layout option 6, "Refined, compact": the same arrangement with modern, denser styling. */

.layout-compact {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #edf0f3;
    color: #1b2330;
    font: 14px "IBM Plex Sans Condensed", "Arial Narrow", "Segoe UI", Arial, sans-serif;
}

/* On a desktop the grid scrolls inside the window. */
@media (min-width: 641px) {
    .layout-compact {
        height: 100vh;
    }
}

.layout-compact svg.i {
    width: 16px;
    height: 16px;
    flex: none;
    color: #2f5596;
}

.layout-compact .top {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 16px;
    padding: 0 16px;
    background: #ffffff;
    border-bottom: 1px solid #d5dbe2;
}

.layout-compact .brand {
    font-weight: 600;
    font-size: 16px;
    color: #2f5596;
}

.layout-compact .menu summary,
.layout-compact .menu-top {
    padding: 4px 10px;
    border-radius: 4px;
}

.layout-compact .menu summary:hover,
.layout-compact .menu details[open] > summary {
    background: #edf0f3;
}

.layout-compact .menu-items {
    top: calc(100% + 4px);
    padding: 4px;
    background: #ffffff;
    border: 1px solid #d5dbe2;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(27, 35, 48, 0.12);
}

.layout-compact .menu-items button {
    padding: 6px 12px 6px 28px;
    border-radius: 4px;
}

.layout-compact .menu-items button:not([disabled]):hover {
    background: #edf0f3;
}

.layout-compact .menu-items button[disabled] {
    color: #9aa3ae;
}

.layout-compact .menu-items button[aria-current="true"]::before {
    color: #2f5596;
}

.layout-compact .menu-heading {
    padding: 6px 12px 2px 28px;
    font-size: 12px;
    color: #5b6573;
}

.layout-compact .menu-items hr {
    margin: 4px 0;
    border: 0;
    border-top: 1px solid #e1e5ea;
}

.layout-compact .who {
    margin-left: auto;
    color: #5b6573;
    white-space: nowrap;
}

.layout-compact .who b {
    font-weight: 500;
    color: #1b2330;
}

.layout-compact .bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 8px 16px;
    background: #f8f9fb;
    border-bottom: 1px solid #d5dbe2;
}

.layout-compact .seg {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #d5dbe2;
    border-radius: 4px;
}

.layout-compact .seg button,
.layout-compact .seg a {
    height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: none;
    border: 0;
    border-right: 1px solid #d5dbe2;
    font: inherit;
    font-weight: 500;
    color: inherit;
    white-space: nowrap;
    cursor: default;
}

.layout-compact .seg > :last-child {
    border-right: 0;
}

.layout-compact .seg a {
    text-decoration: none;
}

.layout-compact .seg a:not([href]) {
    color: #9aa3ae;
}

.layout-compact .seg .primary {
    color: #ffffff;
    background: #2f5596;
}

.layout-compact .seg .primary svg.i {
    color: #ffffff;
}

.layout-compact .ctx {
    margin-left: auto;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: #fff7cf;
    border: 1px solid #e8d98a;
    border-radius: 4px;
}

.layout-compact .ctx .k {
    color: #5b6573;
}

.layout-compact .ctx .sep {
    color: #b8a14a;
}

.layout-compact .body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.layout-compact .groups {
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid #d5dbe2;
}

.layout-compact .groups-label {
    padding-bottom: 6px;
    font-size: 11px;
    color: #5b6573;
}

.layout-compact .group-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.layout-compact .group-list a {
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

.layout-compact .group-list a:hover {
    background: #edf0f3;
}

.layout-compact .group-list a[aria-current] {
    background: #2f5596;
    color: #ffffff;
}

.layout-compact .grid {
    flex: 1;
    min-width: 0;
    overflow: auto;
    background: #ffffff;
}

.layout-compact .grid table {
    width: 100%;
    border-collapse: collapse;
}

.layout-compact .grid th {
    position: sticky;
    top: 0;
    height: 32px;
    padding: 0 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #3b4452;
    background: #f5f7f9;
    border-right: 1px solid #e1e5ea;
    border-bottom: 1px solid #cfd5dc;
    white-space: nowrap;
}

.layout-compact .grid td {
    height: 31px;
    padding: 0;
    border-right: 1px solid #eef1f4;
    border-bottom: 1px solid #e9edf1;
    white-space: nowrap;
}

.layout-compact .grid td a {
    display: block;
    padding: 0 12px;
    line-height: 30px;
    color: inherit;
    text-decoration: none;
}

.layout-compact .grid td.id a,
.layout-compact .grid td.phone a {
    color: #5b6573;
    font-variant-numeric: tabular-nums;
}

.layout-compact .grid tbody tr:hover td {
    background: #f5f8fc;
}

.layout-compact .grid tbody tr.sel td {
    background: #dce6f5;
    font-weight: 600;
}

.layout-compact .grid td.empty {
    padding: 0 12px;
    color: #5b6573;
}

.layout-compact .status {
    min-height: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 16px;
    font-size: 13px;
    color: #5b6573;
    background: #ffffff;
    border-top: 1px solid #d5dbe2;
}

.layout-compact .status span:last-child {
    margin-left: auto;
}

@media (max-width: 800px) {
    .layout-compact .who {
        display: none;
    }

    .layout-compact .ctx {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .layout-compact .grid .id,
    .layout-compact .grid .address,
    .layout-compact .grid .phone {
        display: none;
    }

    .layout-compact .grid th {
        padding: 0 8px;
    }

    .layout-compact .grid td a {
        padding: 6px 8px;
        line-height: normal;
        white-space: normal;
    }
}

.layout-compact .menu a.menu-top:hover {
    background: #edf0f3;
}

/* Property Data Record */

.layout-compact .accounts {
    font-size: 12px;
    color: #5b6573;
}

.layout-compact .accounts th {
    padding-right: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.layout-compact .accounts td {
    min-width: 44px;
    height: 24px;
    padding: 0 6px;
    color: #1b2330;
    background: #ffffff;
    border: 1px solid #d5dbe2;
}

.layout-compact .record {
    padding: 12px 16px;
}

.layout-compact .record-grid {
    gap: 12px;
}

.layout-compact .record .panel {
    padding: 8px 12px 12px;
    background: #ffffff;
    border: 1px solid #d5dbe2;
    border-radius: 6px;
}

.layout-compact .record legend {
    padding: 0 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b6573;
}

.layout-compact .record label,
.layout-compact .record .term-fixed,
.layout-compact .record .supplement-label {
    font-size: 13px;
    color: #3b4452;
}

.layout-compact .record .col {
    font-size: 12px;
    font-weight: 600;
    color: #5b6573;
}

.layout-compact .record input:not([type=checkbox]),
.layout-compact .record textarea {
    height: 28px;
    padding: 0 8px;
    color: #1b2330;
    background: #ffffff;
    border: 1px solid #cfd5dc;
    border-radius: 4px;
}

.layout-compact .record textarea {
    height: calc(100% - 1.5em);
    padding: 6px 8px;
}

.layout-compact .record input:focus,
.layout-compact .record textarea:focus {
    border-color: #2f5596;
    outline: 2px solid rgba(47, 85, 150, 0.25);
}

.layout-compact .record input[readonly] {
    color: #5b6573;
    background: #f5f7f9;
}

.layout-compact .record .with-button button {
    padding: 0 8px;
    font-size: 13px;
    color: #9aa3ae;
    background: #ffffff;
    border: 1px solid #d5dbe2;
    border-radius: 4px;
}

.layout-compact .record .note {
    font-size: 12px;
    color: #5b6573;
}

.layout-compact .record-status {
    margin: 0 0 12px;
    padding: 6px 10px;
    color: #1d5a2f;
    background: #e7f3ea;
    border: 1px solid #b9dcc2;
    border-radius: 4px;
}

.layout-compact .record-errors {
    margin: 0 0 12px;
    padding: 8px 12px 8px 28px;
    background: #fdecec;
    border: 1px solid #f0c2c2;
    border-radius: 4px;
}

/* Menu items that are links */

.layout-compact .menu-items a {
    padding: 6px 12px 6px 28px;
    border-radius: 4px;
}

.layout-compact .menu-items a[href]:hover {
    background: #edf0f3;
}

.layout-compact .menu-items a:not([href]) {
    color: #9aa3ae;
}

/* Dialogs */

.layout-compact .dialog {
    background: #ffffff;
    border: 1px solid #d5dbe2;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(27, 35, 48, 0.12);
}

.layout-compact .dialog-title {
    padding: 16px 20px 0;
    font-size: 18px;
    font-weight: 600;
}

.layout-compact .dialog-body {
    padding: 12px 20px 20px;
}

.layout-compact .dialog .button,
.layout-compact .dialog button {
    height: 34px;
    padding: 0 14px;
    font-weight: 500;
    color: #1b2330;
    background: #ffffff;
    border: 1px solid #cfd5dc;
    border-radius: 4px;
}

.layout-compact .dialog .primary {
    color: #ffffff;
    background: #2f5596;
    border-color: #2f5596;
}

.layout-compact .dialog .danger {
    color: #ffffff;
    background: #b3261e;
    border-color: #b3261e;
}

.layout-compact .dialog-field {
    font-size: 13px;
    color: #3b4452;
}

.layout-compact .dialog-field input,
.layout-compact .dialog-field select {
    height: 34px;
    padding: 0 8px;
    font-size: 14px;
    color: #1b2330;
    background: #ffffff;
    border: 1px solid #cfd5dc;
    border-radius: 4px;
}

.layout-compact .dialog-error,
.layout-compact .dialog-done {
    padding: 8px 12px;
    border-radius: 4px;
}

.layout-compact .dialog-error {
    color: #8a1c1c;
    background: #fdecec;
    border: 1px solid #f0c2c2;
}

.layout-compact .dialog-done {
    color: #1d5a2f;
    background: #e7f3ea;
    border: 1px solid #b9dcc2;
}

.layout-compact .dialog-table th {
    font-size: 12px;
    font-weight: 600;
    color: #5b6573;
    border-bottom: 1px solid #e1e5ea;
}

.layout-compact .dialog-table td {
    border-bottom: 1px solid #eef1f4;
}

.layout-compact .dialog-table button {
    height: 28px;
    padding: 0 10px;
}

.layout-compact .record-nav {
    height: 22px;
    margin: 0 6px;
    padding: 0 6px;
    color: #2f5596;
    background: #ffffff;
    border: 1px solid #d5dbe2;
    border-radius: 4px;
}

.layout-compact .record-nav[disabled] {
    color: #c3c9d1;
}
