* { box-sizing: border-box; }
body { margin: 0; font-family: Tahoma, Arial, sans-serif; background: #f5f7ff; color: #1c1c1c; }
.topbar { background: #c9c9ff; border-bottom: 1px solid #8a8ad4; padding: 8px 16px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: bold; font-size: 18px; color: #2a2a5f; }
.user { font-size: 12px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.user a { margin-left: 0; color: #2a2a5f; text-decoration: none; }
.user-role-pill { display:inline-block; padding:2px 8px; border-radius:999px; background:#5d6f9d; color:#fff; font-weight:bold; font-size:11px; }
.user-role-list { color:#46506f; font-size:11px; }
.app { display: flex; min-height: calc(100vh - 42px); }
.sidebar { width: 240px; background: #f0f2ff; border-right: 1px solid #8a8ad4; padding: 12px; }
.menu-title { font-weight: bold; margin-bottom: 8px; color: #2a2a5f; }
.menu-group { margin-top: 12px; border: 1px solid #c7cdf8; border-radius: 6px; background: #f7f8ff; overflow: hidden; }
.menu-group[open] { background: #eef1ff; }
.menu-group-items { padding: 6px; }
.menu-section { list-style: none; padding: 9px 10px; font-size: 12px; font-weight: bold; color: #2a2a5f; cursor: pointer; background: #e3e7ff; border-bottom: 1px solid #c7cdf8; }
.menu-section::-webkit-details-marker { display: none; }
.menu-section::after { content: '\25be'; float: right; font-size: 11px; color: #49557c; }
.menu-group:not([open]) .menu-section::after { content: '\25b8'; }
.menu-item { display: block; padding: 7px 9px; margin: 4px 0; background: #dde1ff; color: #1c1c1c; text-decoration: none; border: 1px solid #b0b6ff; border-radius: 4px; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.menu-item:hover { background: #cfd5ff; }
.menu-item.is-active { background: #7a84bb; border-color: #5b679f; color: #ffffff; font-weight: bold; }
.menu-item.is-active .menu-count-badge { background: #fff; color: #5b679f; }
.content { flex: 1; padding: 16px; background: #ffffff; }
.card { border: 1px solid #b0b6ff; margin-bottom: 16px; }
.card-header { background: #4f6db8; color: #ffffff; padding: 6px 10px; font-weight: bold; }
.card-body { padding: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 12px; }
.table th { background: #0c6aa6; color: #fff; padding: 6px; text-align: left; }
.table td { border-bottom: 1px solid #cfd5ff; padding: 6px; }
.form-row { display: flex; gap: 12px; margin-bottom: 10px; }
.form-row label { display: block; font-size: 12px; margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 6px; border: 1px solid #7c7c7c; border-radius: 2px; font-size: 12px; }
.btn { display: inline-block; padding: 6px 12px; background: #0c6aa6; color: #fff; border: none; border-radius: 2px; text-decoration: none; cursor: pointer; font-size: 12px; }
.btn.secondary { background: #5b5b5b; }
.notice { padding: 8px 10px; background: #e7ecff; border: 1px solid #b0b6ff; margin-bottom: 12px; }

.market-sheet {
    background: #f8f1df;
    border: 1px solid #d8cdb1;
    box-shadow: 0 1px 0 #efe3c4 inset;
    padding: 20px 24px 24px;
    color: #2d2419;
}

.market-masthead {
    border-bottom: 3px double #8c7857;
    margin-bottom: 18px;
    padding-bottom: 14px;
    text-align: center;
}

.market-kicker {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #7d6746;
    margin-bottom: 6px;
}

.market-masthead h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    line-height: 1;
    color: #2a2015;
}

.market-subtitle {
    margin-top: 8px;
    font-size: 13px;
    color: #675641;
}

.market-columns {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.market-column {
    flex: 1;
    min-width: 0;
}

.market-section-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: bold;
    color: #34281a;
    border-bottom: 1px solid #bda982;
    padding-bottom: 6px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.market-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.market-list li {
    padding: 8px 0;
    border-bottom: 1px dotted #ccb88f;
}

.market-item-title {
    display: block;
    font-size: 16px;
    font-family: Georgia, "Times New Roman", serif;
    color: #2c2115;
}

.market-item-meta {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #856f4d;
    margin-top: 3px;
}

.market-suppliers {
    border-top: 2px solid #c6b28a;
    padding-top: 18px;
}

.market-supplier-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.market-supplier-card {
    width: 128px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.market-supplier-card:hover {
    text-decoration: none;
}

.market-supplier-icon-wrap {
    display: flex;
    justify-content: center;
}

.market-supplier-icon,
.market-supplier-placeholder {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    border: 3px solid #d7c29a;
    background: #efe4ca;
    object-fit: cover;
}

.market-supplier-name {
    margin-top: 7px;
    font-size: 10px;
    line-height: 1.4;
    color: #5f523f;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    word-break: break-word;
}

@media (max-width: 800px) {
    .market-columns {
        flex-direction: column;
        gap: 18px;
    }

    .market-masthead h1 {
        font-size: 28px;
    }
}

.dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(34, 28, 20, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 999;
}

.dialog-card {
    width: 100%;
    max-width: 460px;
    background: #fffdf8;
    border: 1px solid #d9c9a8;
    box-shadow: 0 18px 42px rgba(44, 33, 21, 0.18);
    padding: 22px;
}

.dialog-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c2115;
    margin-bottom: 10px;
}

.dialog-body {
    font-size: 14px;
    line-height: 1.6;
    color: #5b4b35;
}

.dialog-actions {
    margin-top: 18px;
    text-align: right;
}

.market-product-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.market-product-copy {
    flex: 1;
    min-width: 0;
}

.market-product-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.news-btn {
    background: #7a3e18;
    border: 1px solid #5c2b0f;
    color: #fff7ea;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}

.news-btn:hover {
    background: #623113;
}

.market-modal-backdrop {
    background: rgba(31, 23, 14, 0.72);
}

.market-modal-card {
    max-width: 760px;
    background: #f8f1df;
    border: 1px solid #d0bf9d;
}

.image-modal-card {
    max-width: 640px;
}

.market-modal-body {
    color: #4d402e;
}

.market-modal-section-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: bold;
    color: #34281a;
    border-bottom: 1px solid #c4af84;
    margin: 10px 0 12px;
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.market-order-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 8px;
}

.market-order-photo-wrap {
    width: 210px;
    min-width: 210px;
    min-height: 170px;
    background: #efe4ca;
    border: 1px solid #d2bf97;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.market-order-photo {
    width: 100%;
    max-height: 210px;
    object-fit: contain;
}

.market-order-info {
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
}

.market-image-preview-large {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    background: #efe4ca;
    border: 1px solid #d2bf97;
}

.market-modal-empty {
    padding: 18px;
    text-align: center;
    color: #715d42;
    font-style: italic;
}

.market-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.center-actions {
    justify-content: center;
}

@media (max-width: 800px) {
    .market-product-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .market-product-actions {
        justify-content: flex-start;
    }

    .market-order-layout {
        flex-direction: column;
    }

    .market-order-photo-wrap {
        width: 100%;
        min-width: 0;
    }

    .market-modal-card {
        max-width: 100%;
    }
}
.market-order-unit-note {
    padding: 8px 10px;
    min-height: 33px;
    border: 1px solid #bda982;
    background: #efe4ca;
    color: #5f523f;
    font-size: 12px;
    display: flex;
    align-items: center;
}
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.status-submitted {
    background: #fff2d9;
    color: #8a5b00;
    border-color: #e3c58a;
}

.status-contacted {
    background: #ddeeff;
    color: #155c8f;
    border-color: #99c4e4;
}

.status-accepted {
    background: #e2f5e2;
    color: #276227;
    border-color: #98cd98;
}

.status-completed {
    background: #dff3df;
    color: #2d6a2d;
    border-color: #a9d3a9;
}

.status-cancelled {
    background: #f6dede;
    color: #8b2f2f;
    border-color: #d8a7a7;
}

.status-no-sale {
    background: #f4ebd8;
    color: #7a5a18;
    border-color: #d8bd80;
}

.status-unknown {
    background: #ececec;
    color: #4d4d4d;
    border-color: #c8c8c8;
}
.comic-page {
    background: linear-gradient(180deg, #fcf8ef 0%, #f0f7ec 100%);
    border: 1px solid #d7c7a1;
    padding: 20px;
}

.comic-hero {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 18px;
}

.comic-hero-copy,
.comic-landscape,
.comic-panel {
    background: #fffaf0;
    border: 3px solid #2d2419;
    box-shadow: 6px 6px 0 rgba(45, 36, 25, 0.18);
    border-radius: 18px;
}

.comic-hero-copy {
    flex: 1;
    padding: 20px;
}

.comic-hero-copy h1,
.comic-panel h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: #2d2419;
    margin-top: 0;
}

.comic-tag,
.comic-badge {
    display: inline-block;
    background: #ffd54f;
    color: #442f00;
    border: 2px solid #2d2419;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.comic-landscape {
    width: 40%;
    min-height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #bfe6ff 0%, #bfe6ff 42%, #bedc8a 42%, #97b45e 100%);
}

.sun {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ffd54f;
    border: 3px solid #2d2419;
}

.field {
    position: absolute;
    bottom: 0;
    width: 48%;
    height: 80px;
    background: repeating-linear-gradient(90deg, #7ba53c, #7ba53c 12px, #8eb84a 12px, #8eb84a 24px);
    border-top: 3px solid #2d2419;
}

.field-left { left: 0; }
.field-right { right: 0; }

.greenhouse {
    position: absolute;
    left: 50%;
    bottom: 62px;
    transform: translateX(-50%);
    width: 150px;
    height: 90px;
}

.greenhouse-roof {
    width: 112px;
    height: 36px;
    margin: 0 auto;
    background: #d7f2f4;
    border: 3px solid #2d2419;
    border-bottom: none;
    border-radius: 70px 70px 0 0;
}

.greenhouse-body {
    width: 150px;
    height: 54px;
    background: linear-gradient(90deg, #dff7f8 0, #cbeef0 50%, #dff7f8 100%);
    border: 3px solid #2d2419;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.comic-panel {
    padding: 18px;
    position: relative;
}

.wide-panel {
    grid-column: span 2;
}

.crowd-scene,
.farmer-scene,
.market-stand,
.shop-scene,
.supplier-scene {
    min-height: 120px;
    margin: 12px 0 14px;
    position: relative;
}

.crowd-group {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    justify-content: center;
    padding-top: 26px;
}

.person {
    position: relative;
    width: 26px;
    height: 60px;
    border-radius: 14px 14px 8px 8px;
    border: 3px solid #2d2419;
    display: inline-block;
}

.person:before {
    content: '';
    position: absolute;
    top: -22px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffd7b5;
    border: 3px solid #2d2419;
}

.person.red { background: #ef6a5b; }
.person.blue { background: #5b8def; }
.person.green { background: #66b36d; }
.person.gold { background: #d8a937; }
.person.teal { background: #4fb1aa; }

.farmer-avatar {
    position: absolute;
    left: 16px;
    bottom: 10px;
    width: 90px;
    height: 120px;
}

.hat {
    position: absolute;
    top: 0;
    left: 14px;
    width: 58px;
    height: 18px;
    background: #c58a43;
    border: 3px solid #2d2419;
    border-radius: 20px;
}

.head {
    position: absolute;
    top: 18px;
    left: 24px;
    width: 38px;
    height: 38px;
    background: #ffd7b5;
    border: 3px solid #2d2419;
    border-radius: 50%;
}

.body {
    position: absolute;
    top: 58px;
    left: 18px;
    width: 52px;
    height: 58px;
    background: #4fa35f;
    border: 3px solid #2d2419;
    border-radius: 12px;
}

.crate-stack {
    position: absolute;
    right: 10px;
    bottom: 14px;
    display: flex;
    gap: 10px;
}

.crate {
    width: 52px;
    height: 52px;
    border: 3px solid #2d2419;
    background: #b87a3c;
    border-radius: 8px;
    position: relative;
}

.crate:after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
}

.crate.tomato:after { background: #db5145; }
.crate.cucumber:after { background: #4e9b43; }
.crate.pepper:after { background: #e0b12b; }

.newspaper-stack {
    position: absolute;
    left: 28px;
    bottom: 20px;
    width: 120px;
    height: 90px;
}

.paper {
    position: absolute;
    width: 120px;
    height: 74px;
    background: #fff;
    border: 3px solid #2d2419;
    transform: rotate(-4deg);
}

.paper-back { top: 10px; left: 4px; }
.paper-mid { top: 5px; left: 2px; transform: rotate(2deg); }
.paper-front { top: 0; left: 0; }

.paper-front:before,
.paper-front:after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    height: 6px;
    background: #d5d5d5;
}

.paper-front:before { top: 14px; }
.paper-front:after { top: 28px; }

.stall-awning {
    position: absolute;
    top: 6px;
    right: 26px;
    width: 180px;
    height: 32px;
    border: 3px solid #2d2419;
    background: repeating-linear-gradient(90deg, #e85f52, #e85f52 18px, #fff5ef 18px, #fff5ef 36px);
    border-radius: 12px 12px 0 0;
}

.stall-table {
    position: absolute;
    right: 38px;
    bottom: 22px;
    width: 156px;
    height: 46px;
    border: 3px solid #2d2419;
    background: #8c5a30;
}

.veg-row {
    position: absolute;
    right: 52px;
    bottom: 48px;
    display: flex;
    gap: 10px;
}

.veg {
    width: 28px;
    height: 28px;
    border: 3px solid #2d2419;
    border-radius: 50%;
    display: inline-block;
}

.veg.tomato { background: #e1564e; }
.veg.cucumber { background: #59a64e; border-radius: 18px; width: 18px; height: 34px; }
.veg.lettuce { background: #8ac568; }
.veg.pumpkin { background: #ef9f32; }

.shop-scene {
    background: linear-gradient(180deg, #c5ebff 0%, #c5ebff 48%, #e7d6a8 48%, #e7d6a8 100%);
    border-radius: 14px;
    overflow: hidden;
}

.shop {
    position: absolute;
    bottom: 18px;
    width: 90px;
    height: 70px;
    background: #fff9ef;
    border: 3px solid #2d2419;
}

.shop-one { left: 18px; }
.shop-two { left: 128px; }

.shop:before {
    content: '';
    position: absolute;
    top: -18px;
    left: -3px;
    width: 90px;
    height: 18px;
    background: repeating-linear-gradient(90deg, #d85c3d, #d85c3d 15px, #fff7ec 15px, #fff7ec 30px);
    border: 3px solid #2d2419;
    border-bottom: none;
}

.shop-sign {
    position: absolute;
    right: 16px;
    top: 12px;
    background: #ffd54f;
    border: 3px solid #2d2419;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
}

.supplier-scene {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.shelf-bag {
    width: 74px;
    height: 86px;
    border: 3px solid #2d2419;
    border-radius: 10px 10px 12px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 6px;
}

.fertilizer { background: #f4d56a; }
.fungicide { background: #97c9ef; }
.pesticide { background: #ef9b9b; }

.pipe-rack {
    flex: 1;
    height: 40px;
    border: 3px solid #2d2419;
    background: repeating-linear-gradient(90deg, #b8b8b8, #b8b8b8 12px, #d9d9d9 12px, #d9d9d9 24px);
    border-radius: 10px;
}

.flow-strip {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

.flow-step,
.flow-arrow {
    background: #fffaf0;
    border: 3px solid #2d2419;
    border-radius: 16px;
    padding: 10px 14px;
    font-weight: bold;
}

.post-poll-directions ol {
    margin: 0;
    padding-left: 20px;
}

.post-poll-directions li {
    margin-bottom: 8px;
}

@media (max-width: 900px) {
    .comic-hero {
        flex-direction: column;
    }

    .comic-landscape {
        width: 100%;
    }

    .comic-grid {
        grid-template-columns: 1fr;
    }

    .wide-panel {
        grid-column: span 1;
    }
}
.poster-page {
    background: linear-gradient(180deg, #f9f2df 0%, #f0f6e8 100%);
    border: 1px solid #d8c8a4;
    padding: 22px;
}

.poster-title-wrap {
    max-width: 880px;
    margin: 0 auto 18px;
    text-align: center;
}

.poster-title-wrap h1 {
    margin: 6px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 42px;
    color: #2d2419;
}

.poster-kicker {
    display: inline-block;
    padding: 5px 12px;
    border: 2px solid #2d2419;
    border-radius: 999px;
    background: #ffd54f;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.comic-poster {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 74px 120px 120px;
}

.poster-scene {
    display: block;
    width: 100%;
    height: auto;
}

.caption-box {
    position: absolute;
    width: 250px;
    background: #fffaf0;
    border: 4px solid #2d2419;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 6px 6px 0 rgba(45, 36, 25, 0.18);
    z-index: 2;
}

.caption-label {
    display: inline-block;
    margin-bottom: 8px;
    padding: 4px 10px;
    border: 2px solid #2d2419;
    border-radius: 999px;
    background: #ffd54f;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.caption-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #4f4333;
}

.caption-top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.caption-left {
    left: 0;
    top: 240px;
}

.caption-right {
    right: 0;
    top: 260px;
}

.caption-bottom {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
}

.poster-notes {
    max-width: 1080px;
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.poster-note {
    background: #fffaf0;
    border: 3px solid #2d2419;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: bold;
    color: #3f3528;
    box-shadow: 4px 4px 0 rgba(45, 36, 25, 0.14);
}

@media (max-width: 1100px) {
    .comic-poster {
        padding: 18px 0 0;
    }

    .caption-box {
        position: static;
        transform: none;
        width: auto;
        margin-bottom: 12px;
    }

    .poster-notes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .poster-title-wrap h1 {
        font-size: 32px;
    }

    .poster-notes {
        grid-template-columns: 1fr;
    }
}
.flowchart-page {
    background: linear-gradient(180deg, #f9fbf6 0%, #f1f6ec 100%);
    border: 1px solid #dbe6d6;
    padding: 22px;
}

.flowchart-header {
    max-width: 860px;
    margin: 0 auto 18px;
    text-align: center;
}

.flowchart-header h1 {
    margin: 8px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 40px;
    color: #314131;
}

.flowchart-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid #9db39a;
    background: #eef6ea;
    color: #476246;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flowchart-board {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #d9e4d5;
}

.flowchart-svg {
    display: block;
    width: 100%;
    height: auto;
}

.flowchart-notes {
    max-width: 1180px;
    margin: 16px auto 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.flowchart-note {
    background: #ffffff;
    border: 1px solid #d8e2d3;
    padding: 12px 14px;
    color: #425342;
    line-height: 1.5;
}

@media (max-width: 1000px) {
    .flowchart-notes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .flowchart-header h1 {
        font-size: 32px;
    }

    .flowchart-notes {
        grid-template-columns: 1fr;
    }
}

.supplier-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.supplier-shop-card {
    background: #fbf6e8;
    border: 1px solid #d6c39c;
    box-shadow: 0 1px 0 #fff inset;
    padding: 14px;
}

.supplier-shop-image-wrap {
    height: 160px;
    background: #efe4ca;
    border: 1px solid #d2bf97;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.supplier-shop-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.supplier-shop-placeholder {
    color: #7a6548;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.supplier-shop-type {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8a6f44;
    margin-bottom: 6px;
}

.supplier-shop-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    color: #2c2115;
    margin-bottom: 5px;
}

.supplier-shop-meta,
.supplier-shop-detail,
.supplier-shop-description {
    font-size: 12px;
    color: #5a4c39;
    margin-bottom: 6px;
}

.supplier-shop-price {
    font-size: 18px;
    font-weight: bold;
    color: #7a3e18;
    margin: 10px 0;
}

.supplier-shop-actions {
    margin-top: 10px;
    text-align: right;
}

.supplier-shop-empty {
    background: #fbf6e8;
    border: 1px solid #d6c39c;
    padding: 20px;
    color: #5a4c39;
}

.order-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.order-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 1px solid #d2bf97;
    background: #efe4ca;
}

.supplier-shop-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.supplier-shop-card {
    padding: 12px;
}

.supplier-shop-image-wrap {
    height: 110px;
    margin-bottom: 8px;
}

.supplier-shop-title {
    font-size: 18px;
}

.supplier-shop-meta,
.supplier-shop-detail,
.supplier-shop-description {
    font-size: 11px;
}

.supplier-shop-price {
    font-size: 15px;
    margin: 8px 0;
}

@media (max-width: 1200px) {
    .supplier-shop-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .supplier-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .supplier-shop-grid {
        grid-template-columns: 1fr;
    }
}

.supplier-detail-box {
    background: #fffdf8;
    border: 1px solid #d8c9a8;
    padding: 10px 12px;
    color: #4d402e;
    line-height: 1.6;
    white-space: pre-wrap;
}

.supplier-low-stock {
    display: inline-block;
    margin: 2px 0 8px;
    padding: 3px 8px;
    border: 1px solid #d39b55;
    background: #fff1d9;
    color: #8c4d12;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.supplier-stock-badge {
    display: inline-block;
    margin: 2px 0 8px;
    padding: 3px 8px;
    border: 1px solid #b8b8b8;
    background: #f3f3f3;
    color: #4a4a4a;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.supplier-stock-badge.is-in-stock {
    border-color: #80a36f;
    background: #edf7e8;
    color: #3f6730;
}

.supplier-stock-badge.is-ignored {
    border-color: #7a9db9;
    background: #edf5fb;
    color: #375a77;
}

.supplier-stock-badge.is-out-of-stock {
    border-color: #c58b8b;
    background: #faecec;
    color: #8b3d3d;
}

.supplier-card-unavailable {
    opacity: .88;
}

.supplier-buy-trigger.disabled-buy,
.supplier-buy-trigger.disabled-buy:hover,
.supplier-buy-trigger.disabled-buy:focus {
    background: #9a988f;
    border-color: #817d73;
    cursor: not-allowed;
}

.supplier-stock-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.supplier-stock-summary-card {
    background: #fffdf8;
    border: 1px solid #d8c9a8;
    padding: 12px 14px;
}

.supplier-stock-summary-card.is-in-stock {
    border-color: #80a36f;
    background: #edf7e8;
}

.supplier-stock-summary-card.is-low-stock {
    border-color: #d39b55;
    background: #fff1d9;
}

.supplier-stock-summary-card.is-out-of-stock {
    border-color: #c58b8b;
    background: #faecec;
}

.supplier-stock-summary-card.is-ignored {
    border-color: #7a9db9;
    background: #edf5fb;
}

.supplier-stock-summary-value {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    color: #2f2a20;
    line-height: 1;
    margin-bottom: 6px;
}

.supplier-stock-summary-label {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #5a4c39;
}

@media (max-width: 900px) {
    .supplier-stock-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .supplier-stock-summary {
        grid-template-columns: 1fr;
    }
}

.supplier-stock-summary-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.supplier-stock-summary-card:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.supplier-stock-summary-card.is-selected {
    box-shadow: inset 0 0 0 2px #2f2a20;
}

.order-status-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .order-status-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .order-status-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

body.splash-pending .topbar,
body.splash-pending .app {
    visibility: hidden;
}

.market-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f1e8;
}

.market-splash-image {
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    width: auto;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.chat-card { max-width: 980px; display:flex; flex-direction:column; }
.chat-card-body { flex:1; min-height:0; display:flex; flex-direction:column; gap:12px; }
.chat-order-panel { flex:0 0 auto; }
.chat-order-summary { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:4px 12px; font-size:13px; line-height:1.35; }
.chat-status-row { margin-bottom: 0; padding-top: 8px; border-top: 1px solid #e2e7f2; gap:8px; align-items:flex-end; }
.chat-status-row label { font-size: 12px; margin-bottom: 3px; }
.chat-status-row select, .chat-status-row .btn { font-size: 13px; }
.chat-thread { flex:1; min-height:0; background:#f7f8fc; border:1px solid #d8dfef; padding:14px; overflow:auto; }
.chat-empty { color:#667; font-style:italic; }
.chat-day-divider { text-align:center; margin:14px 0 10px; }
.chat-day-divider span { display:inline-block; padding:4px 10px; background:#edf1fb; border:1px solid #cfd8ef; font-size:11px; border-radius:999px; }
.chat-row { display:flex; margin-bottom:10px; }
.chat-row.is-mine { justify-content:flex-end; }
.chat-bubble { max-width:72%; background:#ffffff; border:1px solid #d6dceb; border-radius:12px; padding:10px 12px; }
.chat-row.is-mine .chat-bubble { background:#e9f6ea; border-color:#b9d8bc; }
.chat-meta { font-size:11px; color:#556; margin-bottom:6px; font-weight:bold; }
.chat-meta span { margin-left:8px; font-weight:normal; }
.chat-text { white-space:pre-wrap; line-height:1.5; }
.chat-image-wrap { margin-top:8px; }
.chat-image { width: 220px; max-width: 100%; max-height: 220px; object-fit: cover; border-radius:8px; border:1px solid #cbd3e6; display:block; cursor:pointer; }
.chat-compose { flex:0 0 auto; border-top:1px solid #e2e7f2; padding-top:10px; }
.chat-compose-preview { display:flex; align-items:flex-start; gap:8px; margin:0 0 6px 48px; }
.chat-compose-image-preview { max-width:92px; max-height:92px; border-radius:8px; border:1px solid #cbd3e6; display:block; }
.chat-image-clear { border:1px solid #c9d3e5; background:#fff; color:#334; padding:4px 8px; cursor:pointer; }
.chat-compose-row { display:flex; gap:8px; align-items:flex-end; }
.chat-file-input { display:none; }
.chat-attach-btn { width:42px; height:42px; border:1px solid #c9d3e5; background:#f7f9fd; color:#2f3c57; display:flex; align-items:center; justify-content:center; position:relative; cursor:pointer; border-radius:6px; flex:0 0 auto; }
.chat-attach-frame { width:18px; height:20px; border:2px solid #5a6986; border-radius:3px; position:relative; display:block; background:linear-gradient(180deg, #fdfefe 0%, #edf3fb 100%); }
.chat-attach-frame:before { content:""; position:absolute; left:2px; right:2px; bottom:2px; height:7px; background:linear-gradient(135deg, #a9d39e 0 50%, #7daae6 50% 100%); border-radius:2px; }
.chat-attach-frame:after { content:""; position:absolute; top:3px; right:3px; width:4px; height:4px; border-radius:50%; background:#f2c14c; }
.chat-attach-plus { position:absolute; right:4px; top:1px; font-size:15px; font-weight:bold; color:#2158a8; line-height:1; }
.chat-compose-text { flex:1 1 auto; min-height:64px; max-height:140px; resize:vertical; }
.chat-compose-note { font-size: 11px; color: #5d6a84; margin-bottom: 6px; }
.chat-compose.is-drag-over { border-top-color:#7ea0dd; background:#f4f8ff; }
.menu-count-badge { display:inline-block; min-width:18px; padding:1px 6px; margin-left:6px; border-radius:999px; background:#f0a11f; color:#fff; font-size:11px; line-height:1.4; text-align:center; }
.chat-toast { position:absolute; top:12px; right:12px; z-index:20; background:#2c3d58; color:#fff; padding:8px 12px; border-radius:8px; box-shadow:0 10px 24px rgba(0,0,0,0.18); font-size:12px; opacity:1; transition:opacity 0.28s ease; }
.chat-toast.is-hiding { opacity:0; }
.chat-image-lightbox { position:fixed; inset:0; z-index:30; display:flex; align-items:center; justify-content:center; }
.chat-image-lightbox-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.55); }
.chat-image-lightbox-card { position:relative; z-index:1; padding:18px; background:#fff; border-radius:12px; box-shadow:0 18px 40px rgba(0,0,0,0.28); max-width:92vw; max-height:92vh; }
.chat-image-lightbox-preview { display:block; max-width:calc(92vw - 36px); max-height:calc(92vh - 36px); border-radius:8px; }
.chat-image-lightbox-close { position:absolute; top:8px; right:8px; width:30px; height:30px; border:0; border-radius:50%; background:#2f3c57; color:#fff; cursor:pointer; }
@media (max-width: 700px) { .chat-order-summary { grid-template-columns: repeat(2, minmax(0,1fr)); } .chat-bubble { max-width: 92%; } .chat-compose-row { align-items:stretch; } .chat-compose-text { min-height: 74px; } }

.chat-modal-backdrop { position: fixed; inset: 0; background: transparent; display: flex; align-items: flex-start; justify-content: flex-end; padding: 54px 14px 6px 14px; z-index: 1200; pointer-events: none; }
.chat-modal-card { width: min(620px, calc(100vw - 270px)); height: calc(100vh - 60px); background: #fff; border: 1px solid #cfd8ea; box-shadow: 0 18px 42px rgba(0,0,0,0.22); display: flex; flex-direction: column; pointer-events: auto; }
.chat-modal-card.is-minimized { height: auto; }
.chat-modal-card.is-minimized .chat-modal-iframe { display: none; }
.chat-modal-header { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-bottom:1px solid #d8e0ef; background:#f7f9fd; }
.chat-modal-title { font-weight:bold; color:#2c3850; }
.chat-modal-controls { display:flex; gap:6px; }
.chat-modal-mini, .chat-modal-close { min-width: 34px; padding: 6px 0; }
.chat-modal-iframe { flex:1; width:100%; border:0; background:#fff; }
@media (max-width: 900px) { .chat-modal-backdrop { padding: 48px 8px 4px 8px; } .chat-modal-card { width: min(100vw - 16px, 620px); height: calc(100vh - 52px); } }

.chat-embed-body { margin: 0; background: #fff; height: 100vh; overflow: hidden; }
.chat-embed-content { padding: 12px; height: 100vh; box-sizing: border-box; }
.chat-embed-content .chat-card { max-width: none; border: 0; margin: 0; height: 100%; }
.chat-embed-content .card-header { background: #f7f9fd; color: #2c3850; border-bottom: 1px solid #d8e0ef; }

.role-switcher-form { display:inline-flex; align-items:center; }
.role-switcher-select { padding:4px 6px; border:1px solid #8a8ad4; border-radius:4px; background:#eef1ff; color:#2a2a5f; font-size:11px; min-width:110px; }
.role-access-grid { display:flex; gap:12px; flex-wrap:wrap; }
.role-access-option { display:flex; align-items:center; gap:6px; padding:8px 10px; border:1px solid #c7cdf8; border-radius:6px; background:#f7f8ff; min-width:120px; }
.role-access-option input { width:auto; }

.readiness-dialog-card { max-width: 620px; }
.readiness-group { margin-top: 14px; padding-top: 10px; border-top: 1px solid #d7dcff; }
.readiness-group:first-of-type { border-top: none; padding-top: 0; }
.readiness-group-title { font-weight: bold; color: #2a2a5f; margin-bottom: 6px; }
.readiness-list { margin: 0; padding-left: 18px; color: #4a4a4a; }
.readiness-list li { margin-bottom: 4px; }
.readiness-status-grid { display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; }
.readiness-status-card { min-width:150px; padding:10px 12px; border:1px solid #c7cdf8; border-radius:6px; background:#f7f8ff; }
.readiness-status-card.is-ready { background:#e6f6e6; border-color:#9bc99b; }
.readiness-status-role { font-weight:bold; color:#2a2a5f; margin-bottom:4px; }
.readiness-status-text { font-size:12px; color:#48516d; }

.readiness-links { margin-top: 10px; display:flex; gap:8px; flex-wrap:wrap; }

.menu-setup-badge {
    float: right;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.2px;
    background: #dfe4f9;
    color: #435171;
}
.menu-setup-badge.is-complete { background:#dff4df; color:#2c6b2c; }
.menu-setup-badge.is-attention { background:#f8e4cf; color:#8a4d16; }
.market-bookmark-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; padding-bottom:12px; border-bottom:1px solid #ccb88f; }
.market-tab { display:inline-block; padding:8px 14px; background:#efe4ca; border:1px solid #cbb48b; border-bottom-width:3px; color:#4b3e2a; text-decoration:none; font-family:Georgia, "Times New Roman", serif; font-size:13px; border-radius:8px 8px 0 0; }
.market-tab.is-active { background:#fffdf6; color:#2d2419; border-color:#8f7750; box-shadow:0 -2px 0 #8f7750 inset; }
.market-supplier-type-section { margin-top:20px; }
.supplier-shop-grid-public { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.market-supplier-view-link { margin-top:10px; }
@media (max-width: 1100px) { .supplier-shop-grid-public { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .supplier-shop-grid-public { grid-template-columns: 1fr; } }
