:root {
    --gold: #d4af37;
    --gold-deep: #8d6a2f;
    --gold-ink: #1c1408;
    --gold-soft: #f8f1de;
    --win: #f3f3f3;
    --line: #e5e5e5;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Segoe UI Variable Text", system-ui, sans-serif;
    background: #fff;
    color: #1a1a1a;
}

a {
    color: var(--gold-deep);
}

a:hover {
    color: #5c4318;
}

.w3-gold,
.w3-hover-gold:hover,
.w3-amber,
.w3-hover-amber:hover {
    color: var(--gold-ink) !important;
    background-color: var(--gold) !important;
}

.w3-text-gold,
.w3-hover-text-gold:hover,
.w3-text-amber,
.w3-hover-text-amber:hover {
    color: var(--gold-deep) !important;
}

.w3-border-gold,
.w3-hover-border-gold:hover,
.w3-border-amber,
.w3-hover-border-amber:hover {
    border-color: var(--gold) !important;
}

.w3-pale-gold,
.w3-hover-pale-gold:hover,
.w3-pale-yellow,
.w3-hover-pale-yellow:hover {
    color: var(--gold-ink) !important;
    background-color: var(--gold-soft) !important;
}

.w3-bar .w3-bar-item {
    color: #222;
}

.w3-bar .w3-gold,
.w3-bar .w3-amber {
    color: var(--gold-ink) !important;
}

.w3-content {
    box-sizing: border-box;
}

.wizard {
    height: 100vh;
    display: flex;
    overflow: hidden;
    background: #fff;
}

.scrim {
    display: none;
}

.with-icon {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.with-icon i {
    color: var(--gold-deep);
}

.hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero .search-card {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.hero .search-grid {
    align-items: end;
}

.hero .search-card .w3-button {
    width: 100%;
    height: 28px;
}

.hero h1,
.hero p {
    margin: 0;
}

.hero h1 + p {
    margin-top: 6px;
}

.num {
    font-weight: 700;
    font-size: 1.15em;
}

.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-list p {
    display: flex;
    gap: 10px;
    margin: 0;
}

.contact-list i {
    width: 18px;
    margin-top: 3px;
    text-align: center;
    color: var(--gold-deep);
}

.detail-grid,
.split {
    display: grid;
    gap: 8px;
    align-items: start;
}

.detail-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "main"
        "actions"
        "photos"
        "contact"
        "comments"
        "related"
        "map";
}

.detail-col,
.detail-side {
    display: contents;
}

.detail-grid .firm-window {
    grid-area: main;
}

.detail-grid .biz-section {
    grid-area: actions;
}

.detail-grid .photo-section {
    grid-area: photos;
}

.detail-grid .detail-contact {
    grid-area: contact;
}

.detail-grid .detail-related {
    grid-area: related;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.detail-grid .comment-section {
    grid-area: comments;
    margin-top: 0;
}

.detail-grid .detail-map {
    grid-area: map;
    margin-top: 0;
}

.photo-grid,
.photo-manage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.xp-window .photo-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #716f64 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    min-height: 0;
    cursor: pointer;
}

.photo-thumb img,
.photo-manage-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-manage-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.photo-manage-item img {
    aspect-ratio: 1;
    border: 1px solid #716f64;
}

.photo-manage-item span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 60, 0.45);
}

.photo-viewer[hidden],
.photo-viewer [hidden] {
    display: none !important;
}

.photo-window {
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    background: #ece9d8;
    border: 1px solid #003c74;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35);
}

.photo-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    background: #fff;
    border-top: 1px solid #003c74;
    border-bottom: 1px solid #aca899;
}

.photo-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 160px);
    max-height: calc(100dvh - 160px);
    object-fit: contain;
}

.photo-viewer-bar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 8px;
}

@media (max-width: 640px) {
    .photo-grid,
    .photo-manage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.detail-head .firm-logo {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
}

.detail-head .firm-logo img,
.detail-head .firm-logo .w3-circle {
    width: 72px !important;
    height: 72px !important;
    line-height: 72px !important;
    font-size: 22px;
}

.detail-copy {
    flex: 1;
    min-width: 0;
}

.detail-head h1 {
    margin: 0;
    padding-right: 36px;
    line-height: 1.2;
}

.detail-sub {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    margin: 0;
    line-height: 1.2;
}

.detail-sub .firm-cat,
.detail-sub .firm-place {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-about {
    margin-top: 14px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #7f9db9;
    white-space: pre-wrap;
    line-height: 1.45;
}

.detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.place-like {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    margin-left: auto;
    text-align: right;
}

.place-like p {
    margin: 0;
}

.place-like form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.place-like button.is-on {
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #003c74;
}

.biz-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
}

.biz-actions .w3-button {
    width: 100% !important;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
}

.detail-views {
    margin: 0;
}

.comment-box {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #aca899;
}

.comment-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 0;
}

.detail-map {
    margin-top: 0;
}

.detail-map h2 {
    margin-top: 0;
}

.detail-map iframe {
    display: block;
    width: 100%;
    height: 380px;
    border: 1px solid #7f9db9;
}

.comment-form[hidden] {
    display: none !important;
}

.comment-box h2,
.comment-box h3 {
    margin: 0 0 8px;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #aca899;
}

.comment-avatar {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #7f9db9;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-item header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-item time {
    color: #666;
    white-space: nowrap;
}

.comment-item p {
    margin: 0;
    white-space: pre-wrap;
}

.comment-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 12px;
}

.comment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.comment-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.comment-form .w3-input,
.comment-form textarea {
    width: 100%;
}

.comment-submit {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

@media (max-width: 800px) {
    .comment-fields {
        grid-template-columns: 1fr;
    }
}

.detail-owner {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 0;
}

.detail-contact h2,
.side-firms h2 {
    margin-top: 0;
}

.detail-contact h2 {
    align-items: flex-start;
    line-height: 1.35;
}

.side-firm-list {
    display: flex;
    flex-direction: column;
}

.side-firm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #ece9d8;
    color: inherit;
    text-decoration: none;
}

.side-firm:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.side-firm .firm-logo {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
}

.side-firm .firm-logo img,
.side-firm .firm-logo .w3-circle {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 12px;
}

.side-firm-copy {
    min-width: 0;
}

.side-firm-copy b {
    display: block;
    color: #0000ee;
    font-weight: 700;
}

.side-firm-copy b i {
    color: #d4a017;
}

.side-firm-copy > span {
    display: block;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-firm:hover b {
    text-decoration: underline;
}

.contact-row {
    display: grid;
    grid-template-columns: 18px 72px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid #ece9d8;
}

.contact-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.contact-row i {
    width: 18px;
    margin-top: 2px;
    text-align: center;
    color: #003c74;
}

.contact-label {
    color: #666;
}

.contact-value {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 992px) {

    .scrim.is-on {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(28, 20, 8, 0.35);
    }
}

@media (min-width: 800px) {

    .hero .search-card.home .search-grid {
        grid-template-columns: minmax(0, 1fr) 110px;
        align-items: end;
    }
}

@media (min-width: 993px) {

    .detail-grid {
        grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.7fr);
        grid-template-areas: none;
        gap: 10px;
    }

    .detail-col,
    .detail-side {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }

    .detail-grid .firm-window,
    .detail-grid .biz-section,
    .detail-grid .photo-section,
    .detail-grid .comment-section,
    .detail-grid .detail-map,
    .detail-grid .detail-contact,
    .detail-grid .detail-related {
        grid-area: auto;
    }

    .split {
        grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    }
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

@media (max-width: 600px) {
    h1 {
        font-size: 28px;
    }

    .w3-content.w3-padding-16,
    .w3-content.w3-padding-32 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .cat-name {
        font-size: 15px;
    }
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-right: 8px;
}

.cat-grid,
.firm-grid,
.stat-grid {
    display: grid;
    gap: 12px;
    width: 100%;
    align-items: stretch;
}

.cat-grid {
    grid-template-columns: minmax(0, 1fr);
}

.firm-grid,
.stat-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 600px) {
    .cat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .firm-grid,
    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 993px) {
    .cat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .firm-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cat-card,
.firm-card,
.stat-card {
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
}

.firm-card,
.stat-card,
.cat-card,
.form-card,
.w3-card {
    border: 1px solid var(--line) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.firm-card,
.stat-card {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: #fff;
}

.firm-window {
    position: relative;
    overflow: hidden;
}

.firm-card.is-gold,
.firm-window.is-gold {
    border-color: #e4cc86 !important;
}

.gold-corner {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--gold);
    color: var(--gold-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-bottom-left-radius: 8px;
}

.firm-window.is-gold .firm-copy,
.firm-window.is-ok .firm-copy {
    padding-right: 78px;
}

.cat-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px !important;
    text-align: left;
    text-decoration: none;
    min-height: 72px;
}

.cat-card .w3-small {
    margin-left: auto;
    white-space: nowrap;
    flex: 0 0 auto;
}

.cat-icon {
    color: var(--gold-deep);
    font-size: 26px;
    line-height: 1;
}

.cat-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.admin-cat-list {
    background: #fff;
    border: 1px solid #716f64;
}

.admin-cat-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 90px 80px auto;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
}

.admin-cat + .admin-cat .admin-cat-row {
    border-top: 1px solid #ece9d8;
}

.admin-cat-name {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.admin-cat-row.is-child {
    padding-left: 36px;
    background: #f6f4ea;
    border-top: 1px solid #ece9d8;
}

.admin-cat-row.is-off {
    background: #f3f3f3;
    color: #666;
}

@media (max-width: 800px) {
    .admin-cat-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

.cat-name,
.firm-title,
.firm-meta,
.firm-text,
.stat-card {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.stat-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cat-name {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 1.3;
}

@media (min-width: 600px) {
    .cat-card {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        text-align: center;
        gap: 8px;
        min-height: 148px;
        padding: 16px 12px !important;
    }

    .cat-card .w3-small {
        margin-top: auto;
        margin-left: 0;
    }

    .cat-name {
        width: 100%;
        min-height: 2.6em;
        font-size: 14px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

.firm-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    padding: 16px;
}

.firm-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.firm-card .firm-head {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    grid-template-areas:
        "logo name"
        "meta meta";
    align-items: center;
    column-gap: 10px;
    row-gap: 6px;
}

.firm-card .firm-logo {
    grid-area: logo;
    align-self: center;
}

.firm-card .firm-copy {
    grid-area: name;
    align-self: center;
    padding-right: 36px;
}

.firm-card .firm-title {
    min-height: 0;
}

.firm-card .firm-meta {
    grid-area: meta;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 0;
}

.firm-card .firm-cat {
    flex: 0 1 auto;
    max-width: 58%;
}

.firm-card .firm-place {
    flex: 0 1 auto;
}

.firm-logo {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
}

.firm-logo img,
.firm-logo .w3-circle {
    width: 40px;
    height: 40px;
    object-fit: cover;
    display: block;
}

.firm-copy {
    flex: 1;
    min-width: 0;
}

.firm-title {
    color: #111;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    line-height: 1.3;
}

.firm-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.firm-card .firm-cat,
.firm-card .firm-place {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.firm-body > .w3-tag {
    align-self: flex-start;
}

.firm-text {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.2em;
    line-height: 1.4;
}

.firm-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin: auto 0 0;
}

.firm-actions span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.firm-actions a {
    flex: 0 0 auto;
    white-space: nowrap;
}

.firm-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #003c74 !important;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.firm-phone .num {
    font-size: 1.2em;
    letter-spacing: 0.04em;
}

.firm-phone.is-empty {
    color: #666 !important;
    font-weight: 400;
}

.firm-more {
    color: #0000ee;
}

.how-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

.how-steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    margin: 0;
    padding: 12px 14px;
}

.how-steps li + li {
    border-top: 1px solid #ece9d8;
}

.how-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    background: linear-gradient(#0997ff 0%, #0058ee 8%, #0054e3 40%, #005bff 93%, #003dd7 100%);
    border: 1px solid #003c74;
    border-radius: 2px;
    color: #fff;
    line-height: 1;
}

.how-no .num {
    color: #fff;
    font-size: 11px;
}

.how-steps h3 {
    margin: 0 0 2px;
}

.how-steps p {
    margin: 0;
    color: #444;
}

@media (min-width: 800px) {
    .how-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .how-steps li + li {
        border-top: 0;
        border-left: 1px solid #ece9d8;
    }
}

.search-card {
    margin-top: 18px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.search-card label {
    display: block;
    color: var(--gold-deep);
    font-size: 12px;
    margin-bottom: 4px;
}

.search-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
}

.search-card .w3-input,
.search-card .w3-select {
    width: 100%;
    margin: 0;
    border: 1px solid #e4cc86;
    background: #fff;
    box-sizing: border-box;
}

.search-card .w3-button {
    width: 100%;
}

.search-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

@media (min-width: 600px) {
    .search-card.home .search-grid {
        grid-template-columns: minmax(0, 1fr) 140px;
        align-items: end;
    }

    .search-card.account-search .search-grid {
        grid-template-columns: minmax(0, 1fr) 140px;
        align-items: end;
    }
}

@media (min-width: 993px) {
    .search-card.list .search-grid {
        grid-template-columns: minmax(0, 1fr) 140px;
        align-items: end;
    }

    .search-card .w3-button {
        width: auto;
    }
}

.form-card {
    padding: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px 16px;
    align-items: start;
}

.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-wide {
    grid-column: 1 / -1;
}

.form-card label,
.form-stack label {
    display: block;
    margin: 0;
    color: var(--gold-deep);
    font-size: 13px;
}

.form-card .w3-input,
.form-card .w3-select,
.form-stack .w3-input,
.form-stack .w3-select {
    width: 100%;
    margin: 0;
    height: 42px;
    padding: 8px 10px;
    border: 1px solid #e4cc86;
    background: #fff;
    box-sizing: border-box;
    line-height: 1.4;
}

.form-card textarea,
.form-stack textarea {
    height: auto;
    min-height: 140px;
    resize: vertical;
}

.form-card input[type="file"] {
    width: 100%;
    margin: 0;
}

.hint {
    margin: 0;
    color: #777;
    font-size: 12px;
}

.check-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    color: var(--gold-ink) !important;
    font-size: 14px !important;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (min-width: 720px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

body {
    font-family: Tahoma, "Segoe UI", sans-serif;
    font-size: 11px;
    color: #000;
    background: #ece9d8;
    overflow: hidden;
}

.xp-desktop {
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    padding: 0;
    background: #ece9d8;
}

.xp-window {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ece9d8;
    border: 0;
    box-shadow: none;
}

.xp-title {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 3px 0 6px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
    background: linear-gradient(#0997ff 0%, #0058ee 8%, #0054e3 40%, #0054e3 88%, #005bff 93%, #003dd7 100%);
}

.xp-title-text {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.xp-title-text i {
    color: #fff;
}

.xp-menu {
    display: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid #fff;
    color: #fff;
    background: linear-gradient(#3c8dff, #0054e3);
    cursor: pointer;
    flex: 0 0 auto;
}

.xp-call-fab {
    display: none;
}

.xp-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 3px 6px;
    background: #ece9d8;
    border-bottom: 1px solid #aca899;
    box-shadow: inset 0 1px 0 #fff;
}

.xp-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    color: #000 !important;
    text-decoration: none;
    border: 1px solid transparent;
}

.xp-nav a:hover {
    border-color: #003c74;
    background: #fff;
    color: #000 !important;
}

.xp-nav a.is-now {
    background: #fff;
    border-color: #003c74;
    color: #000 !important;
}

.xp-nav a:hover i,
.xp-nav a.is-now i {
    color: #003c74;
}

.xp-nav a.is-now {
    font-weight: 700;
}

.xp-nav a.nav-user {
    margin-left: auto;
    color: #003c74 !important;
    font-weight: 700;
}

.xp-nav a.nav-user:hover {
    color: #003c74 !important;
}

.xp-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #ece9d8;
}

.xp-status {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 4px;
    min-height: 22px;
    padding: 2px 4px;
    background: #ece9d8;
    border-top: 1px solid #fff;
    box-shadow: inset 0 1px 0 #aca899;
    font-size: 11px;
    color: #000;
}

.xp-status-pane {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    border: 1px solid #aca899;
    border-right-color: #fff;
    border-bottom-color: #fff;
    background: #ece9d8;
    white-space: nowrap;
}

.xp-status-links {
    flex: 1;
    min-width: 0;
    gap: 12px;
}

.xp-status a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #000 !important;
    text-decoration: none;
}

.xp-status a:hover {
    color: #003c74 !important;
    text-decoration: underline;
}

.xp-status i {
    color: #003c74;
}

.xp-window .wizard {
    flex: 1;
    height: auto;
    min-height: 0;
    background: #ece9d8;
}

.xp-window .w3-button,
.xp-window button {
    font-family: Tahoma, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #000 !important;
    background: linear-gradient(#fff, #ece9d8) !important;
    border: 1px solid #003c74 !important;
    border-radius: 3px !important;
    box-shadow: inset 1px 1px 0 #fff;
    min-height: 23px;
    padding: 2px 12px !important;
}

.xp-window .w3-button.w3-gold,
.xp-window .w3-button.w3-amber {
    font-weight: 700;
    box-shadow: inset 1px 1px 0 #fff, 0 0 0 1px #003c74;
}

.xp-window a {
    color: #0000ee;
}

.xp-window a:hover {
    color: #551a8b;
}

.xp-window h1 {
    font-family: Tahoma, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #003c74;
}

.xp-window h2,
.xp-window h3 {
    font-family: Tahoma, sans-serif;
    font-size: 13px;
    color: #003c74;
}

.xp-window .with-icon i,
.xp-window .cat-icon,
.xp-window .form-card label,
.xp-window .form-stack label,
.xp-window .search-card label {
    color: #003c74 !important;
}

.xp-window .w3-card,
.xp-window .firm-card,
.xp-window .cat-card,
.xp-window .stat-card,
.xp-window .form-card,
.xp-window .hero,
.xp-window .search-card,
.xp-window .list-box {
    background: #fff !important;
    border-radius: 0 !important;
    border: 1px solid #716f64 !important;
    box-shadow: inset 1px 1px 0 #fff !important;
}

.xp-window .hero {
    background: #fff !important;
}

.xp-window .hero .search-card {
    margin: 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.xp-window .hero .search-card .w3-input,
.xp-window .hero .search-card .w3-select,
.xp-window .hero .search-card .w3-button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 8px !important;
    line-height: 22px !important;
    box-sizing: border-box;
}

.xp-window .hero .search-card .w3-button {
    width: 100% !important;
}

.xp-window .search-card.list .w3-input,
.xp-window .search-card.list .w3-select,
.xp-window .search-card.list .w3-button,
.xp-window .search-card.account-search .w3-input,
.xp-window .search-card.account-search .w3-button {
    height: 28px !important;
    min-height: 28px !important;
    padding: 2px 8px !important;
    line-height: 22px !important;
    box-sizing: border-box;
}

.xp-window .search-card.list .w3-button,
.xp-window .search-card.account-search .w3-button {
    width: 100% !important;
}

.xp-window .search-card.list .search-grid {
    align-items: end;
}

.xp-window .w3-input,
.xp-window .w3-select,
.xp-window input,
.xp-window select,
.xp-window textarea {
    font-family: Tahoma, sans-serif !important;
    font-size: 11px !important;
    color: #000 !important;
    background: #fff !important;
    border: 1px solid #7f9db9 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.xp-window .w3-table {
    background: #fff;
    font-size: 11px;
}

.xp-window .w3-table th {
    background: linear-gradient(#fff, #ece9d8);
    color: #000;
    font-weight: 400;
    border-bottom: 1px solid #aca899;
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.admin-firms td {
    vertical-align: middle;
}

.admin-firm-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
}

.admin-firm-name .firm-logo {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
}

.admin-firm-name .firm-logo img,
.admin-firm-name .firm-logo .w3-circle {
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-size: 11px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.admin-actions form {
    margin: 0;
}

.xp-window .admin-actions .w3-button {
    margin: 0;
}

.xp-window .w3-panel,
.xp-window .w3-pale-yellow,
.xp-window .w3-pale-gold,
.xp-window .w3-light-grey {
    background: #ffffe1 !important;
    color: #000 !important;
    border: 1px solid #003c74 !important;
}

.xp-window .w3-pale-red {
    background: #fff0f0 !important;
    color: #000 !important;
}

.xp-window .w3-pale-green {
    background: #f0fff0 !important;
    color: #000 !important;
}

.xp-window .gold-corner,
.xp-window .w3-tag.w3-gold,
.xp-window .w3-tag.w3-amber {
    background: linear-gradient(#fff7c2, #f5c518) !important;
    color: #000 !important;
    border: 1px solid #b8860b;
    border-radius: 2px !important;
    font-family: Tahoma, sans-serif;
}

.xp-window .gold-corner.ok-corner {
    background: #e7f6ea !important;
    color: #146c2e !important;
    border-color: #7dba8a;
}

.xp-window .firm-card .gold-corner,
.xp-window .firm-detail .gold-corner {
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    padding: 0 !important;
    gap: 0;
    border: 0 !important;
    border-radius: 50% !important;
    background: transparent !important;
    box-shadow: none !important;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
}

.xp-window .firm-card .gold-corner i,
.xp-window .firm-detail .gold-corner i {
    color: #d4a017;
}

.xp-window .firm-card .gold-corner.ok-corner i,
.xp-window .firm-detail .gold-corner.ok-corner i {
    color: #1a7f37;
}

.crumb {
    margin: 0 0 12px;
    padding: 4px 8px;
    background: #fff;
    border: 1px solid #7f9db9;
}

.xp-body .detail-page.w3-padding-32 {
    padding-top: 8px !important;
}

.crumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.crumb li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
}

.crumb li:not(:last-child)::after {
    content: ">";
    margin: 0 6px;
    color: #000;
}

.crumb a,
.crumb [aria-current="page"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.crumb a {
    color: #0000ff;
    text-decoration: none;
}

.crumb a:hover {
    color: #0000ff;
    text-decoration: underline;
}

.crumb [aria-current="page"] {
    color: #000;
    font-weight: 700;
}

.list-box {
    margin: 0 0 8px;
    padding: 10px 12px;
}

.list-box h1,
.list-box p {
    margin: 0;
}

.xp-window .home-title {
    margin: 0 0 10px;
    padding: 0;
    overflow: hidden;
}

.xp-window .home-title h1 {
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px 11px;
    font-size: 15px;
    line-height: 1.3;
    text-align: center;
    border-top: 3px solid #0a246a;
    background: linear-gradient(#fff, #f4f3ee);
}

@media (max-width: 800px) {
    .xp-desktop {
        padding: 0;
        background: #ece9d8;
    }

    .xp-window {
        height: 100%;
        border-width: 0;
        box-shadow: none;
    }

    .xp-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .xp-call-fab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: 10px;
        bottom: 36px;
        z-index: 30;
        width: 42px;
        height: 36px;
        border: 1px solid #003c74;
        border-radius: 3px;
        background: linear-gradient(#fff, #ece9d8);
        color: #003c74;
        text-decoration: none;
        box-shadow: inset 1px 1px 0 #fff, 2px 2px 3px rgba(0, 0, 0, 0.35);
        animation: xp-search-blink 1s steps(1, end) infinite;
    }

    .xp-call-fab i {
        font-size: 16px;
    }

    @keyframes xp-search-blink {
        0%, 49% {
            background: linear-gradient(#fff, #ece9d8);
            color: #003c74;
            border-color: #003c74;
        }

        50%, 100% {
            background: linear-gradient(#0997ff, #0054e3);
            color: #fff;
            border-color: #fff;
        }
    }

    .xp-nav {
        display: none;
    }

    .xp-nav.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .xp-nav a.nav-user {
        margin-left: 0;
    }

    .xp-window h1 {
        font-size: 15px;
    }
}

@media (max-width: 800px) and (prefers-reduced-motion: reduce) {
    .xp-call-fab {
        animation: none;
        background: linear-gradient(#0997ff, #0054e3);
        color: #fff;
        border-color: #fff;
    }
}
