*{box-sizing:border-box}html,body{max-width:100%;overflow-x:hidden}body{margin:0;font-family:Arial,sans-serif;background:#f3f6f8;color:#17313b}img{max-width:100%;height:auto}a{text-decoration:none;color:#0d7c66}code{background:#e9eff1;padding:2px 6px;border-radius:6px}.layout{display:grid;grid-template-columns:280px 1fr;min-height:100vh;max-width:100%}.sidebar{background:linear-gradient(180deg,#11343d,#1f5960);padding:28px 20px;color:#fff}.brand h2{margin:0}.eyebrow{margin:0 0 8px;font-size:12px;letter-spacing:.18em;text-transform:uppercase;opacity:.7}.menu{display:flex;flex-direction:column;gap:8px;margin-top:28px}.menu a,.menu-group{padding:12px 14px;border-radius:12px;color:#dcedf0}.menu a.active,.menu a:hover{background:rgba(255,255,255,.12);color:#fff}.menu-group{font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.65}.content{padding:28px}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:24px}.topbar h1{margin:0 0 6px}.topbar-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.muted{color:#66808a}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:22px}.stat-card,.panel-card{background:#fff;border:1px solid #dbe5e8;border-radius:18px;box-shadow:0 12px 32px rgba(20,45,52,.05)}.stat-card{padding:22px}.stat-card span{display:block;color:#62808a;margin-bottom:10px}.stat-card strong{font-size:34px}.grid-two{display:grid;grid-template-columns:1fr 1fr;gap:20px}.panel-card{padding:20px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.section-head h3{margin:0}.primary-button,.ghost-button,button{display:inline-flex;align-items:center;justify-content:center;padding:11px 16px;border-radius:12px;border:1px solid #c1d4d8;font-weight:700;cursor:pointer}.primary-button,button.primary-button{background:#0d7c66;border-color:#0d7c66;color:#fff}.ghost-button{background:#fff;color:#17313b}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:12px;border-bottom:1px solid #e4ecee;font-size:14px}th{color:#607b84;font-weight:700}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.form-grid label,.stack label{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:500;color:#17313b}.form-grid label.full,.form-actions.full,.permission-box{grid-column:1/-1}.form-grid input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.form-grid select,.form-grid textarea,.stack input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.stack select,.stack textarea{display:block;width:100%;min-height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background:#fff;background-clip:padding-box;border:1px solid #ced4da;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.375rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-grid input::placeholder,.form-grid textarea::placeholder,.stack input::placeholder,.stack textarea::placeholder{color:#6c757d;opacity:1}.form-grid textarea,.stack textarea{min-height:120px;resize:vertical}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus,.stack input:focus,.stack select:focus,.stack textarea:focus{color:#212529;background:#fff;border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-grid select,.stack select{padding-right:2.25rem;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236c757d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right .75rem center;background-size:16px 12px}.form-grid input[type=color]{padding:.375rem;min-height:calc(1.5em + .75rem + 2px)}.form-actions{display:flex;gap:12px}.checkline{display:flex!important;flex-direction:row!important;align-items:center;gap:.5rem;font-weight:400;color:#17313b}.checkline input{width:1.1rem;height:1.1rem;margin:0;border:1px solid rgba(0,0,0,.25);border-radius:.25em;accent-color:#0d6efd;cursor:pointer}.permission-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:12px}.flash{padding:14px 16px;border-radius:14px;margin-bottom:18px;border:1px solid}.flash.success{background:#edf9f4;border-color:#9fd4bc;color:#176043}.flash.error{background:#fff1f1;border-color:#f0b3b3;color:#9b2d2d}.login-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top,#1f5960,#0d1f24)}.login-shell{width:min(100%,480px);padding:20px}.login-card{background:#fff;border-radius:24px;padding:32px;border:1px solid #d8e5e8;box-shadow:0 20px 60px rgba(0,0,0,.15)}.login-card h1{margin:0 0 10px}.stack{display:flex;flex-direction:column;gap:16px;margin-top:20px}.stack .primary-button{width:100%;min-height:calc(1.5em + .75rem + 2px)}@media (max-width:1024px){.layout{grid-template-columns:1fr}.sidebar{padding-bottom:10px}.stats-grid,.grid-two,.form-grid,.permission-grid{grid-template-columns:1fr}.topbar{align-items:stretch}.topbar-actions{justify-content:flex-start}} 

.location-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-section {
    border: 1px solid #dbe5e8;
    border-radius: 18px;
    padding: 20px;
    background: #fcfefe;
}

.location-section h3 {
    margin: 0 0 14px;
}

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

.location-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #17313b;
}

.location-grid input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.location-grid select,
.location-grid textarea,
.opening-hour-row input,
.schedule-row input,
.product-manager-editor input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.product-manager-editor textarea {
    display: block;
    width: 100%;
    min-height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: .375rem;
}

.location-grid input:focus,
.location-grid select:focus,
.location-grid textarea:focus,
.opening-hour-row input:focus,
.schedule-row input:focus,
.product-manager-editor input:focus,
.product-manager-editor textarea:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
}

.location-grid .full,
.location-section .full {
    grid-column: 1 / -1;
}

.location-gallery-grid,
.upload-preview-grid,
.product-manager-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.location-gallery-card,
.upload-preview-card,
.product-card-admin {
    background: #fff;
    border: 1px solid #dbe5e8;
    border-radius: 16px;
    overflow: hidden;
}

.location-gallery-card img,
.upload-preview-card img,
.product-card-admin-media img,
.product-draft-image img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #eff4f6;
}

.location-gallery-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.upload-preview-meta,
.product-card-admin-body {
    padding: 12px;
}

.upload-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.opening-hours-grid,
.schedule-list {
    display: grid;
    gap: 12px;
}

.opening-hour-row,
.schedule-row,
.product-price-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.opening-hour-row strong {
    display: block;
    margin-bottom: 6px;
}

.inline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}

.file-upload-shell {
    border: 1px dashed #b5c9cf;
    border-radius: 16px;
    padding: 18px;
    background: #fff;
}

.file-upload-shell input[type=file] {
    width: 100%;
}

.product-manager {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-manager-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.product-manager-copy p,
.product-card-admin-body p {
    margin: 8px 0 0;
    color: #5f7881;
}

.product-card-admin-body h4 {
    margin: 0;
}

.product-card-admin-meta {
    margin-top: 10px;
    color: #17313b;
    font-size: 13px;
    font-weight: 700;
}

.product-card-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.product-card-admin-placeholder {
    height: 160px;
    display: grid;
    place-items: center;
    color: #6b828b;
    background: #eff4f6;
}

.danger-button {
    color: #9b2d2d;
    border-color: #f0b3b3;
}

.product-manager-editor {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 24, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    z-index: 50;
}

.product-manager-editor.is-open {
    display: flex;
}

.product-manager-editor-dialog {
    width: min(960px, calc(100vw - 48px));
    max-width: 100%;
    max-height: 90vh;
    overflow: auto;
    margin: auto;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #dbe5e8;
    box-shadow: 0 32px 60px rgba(0, 0, 0, .2);
}

.product-manager-editor-header,
.product-manager-editor-actions {
    padding: 20px 24px;
    border-bottom: 1px solid #e4ecee;
}

.product-manager-editor-actions {
    border-bottom: 0;
    border-top: 1px solid #e4ecee;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.product-manager-editor-body {
    padding: 24px;
}

.product-manager-editor .close {
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.product-manager-price-schedule.hidden,
.hidden {
    display: none !important;
}

.product-manager-price-schedule-table,
.product-manager-draft-gallery {
    display: grid;
    gap: 12px;
}

.product-price-row {
    grid-template-columns: 1fr 1fr 1fr auto;
}

.product-draft-image {
    background: #fff;
    border: 1px solid #dbe5e8;
    border-radius: 16px;
    overflow: hidden;
}

.product-draft-image .ghost-button {
    width: calc(100% - 16px);
    margin: 8px;
}

.section-note {
    margin: 0 0 12px;
    color: #66808a;
    font-size: 13px;
}

.section-head-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-listing-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-listing-toolbar,
.admin-listing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-listing-toolbar-primary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.admin-listing-search {
    display: block;
    width: min(320px, 100%);
    min-height: 42px;
    padding: .55rem .8rem;
    font-size: .95rem;
    color: #212529;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 12px;
}

.admin-listing-summary {
    color: #66808a;
    font-size: 14px;
    font-weight: 600;
}

.admin-listing-page-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #17313b;
    font-size: 14px;
    font-weight: 600;
}

.admin-listing-page-size select {
    min-height: 40px;
    padding: .4rem 2rem .4rem .75rem;
    border: 1px solid #ced4da;
    border-radius: 10px;
    background-color: #fff;
}

.admin-listing-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-listing-page-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #c9d9dd;
    border-radius: 10px;
    background: #fff;
    color: #17313b;
    font-weight: 700;
    cursor: pointer;
}

.admin-listing-page-button:hover:not(:disabled) {
    border-color: #0d7c66;
    color: #0d7c66;
}

.admin-listing-page-button.is-active {
    background: #0d7c66;
    border-color: #0d7c66;
    color: #fff;
}

.admin-listing-page-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.status-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.status-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-switch-track {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    border-radius: 999px;
    background: #cfd9dd;
    transition: background-color .2s ease;
}

.status-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(8, 20, 24, .18);
    transition: transform .2s ease;
}

.status-switch-input:checked + .status-switch-track {
    background: #0d7c66;
}

.status-switch-input:checked + .status-switch-track::after {
    transform: translateX(20px);
}

.status-switch-input:disabled + .status-switch-track {
    opacity: .55;
}

.status-switch-text {
    font-size: 14px;
    font-weight: 700;
    color: #17313b;
}

.status-switch.is-loading {
    opacity: .65;
    pointer-events: none;
}

.bulk-delete-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .location-grid,
    .opening-hour-row,
    .schedule-row,
    .product-price-row,
    .product-manager-toolbar {
        grid-template-columns: 1fr;
    }

    .admin-listing-toolbar,
    .admin-listing-footer,
    .admin-listing-toolbar-primary,
    .section-head-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-listing-search {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .product-manager-editor {
        padding: 16px;
        align-items: center;
    }

    .product-manager-editor-dialog {
        width: min(100%, calc(100vw - 32px));
        max-height: calc(100vh - 32px);
        border-radius: 18px;
    }

    .product-manager-editor-header,
    .product-manager-editor-body,
    .product-manager-editor-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.layout > * ,
.grid-two > * ,
.stats-grid > * ,
.location-grid > * ,
.opening-hour-row > * ,
.schedule-row > * ,
.product-price-row > * ,
.product-manager-toolbar > * ,
.topbar > * ,
.topbar-actions > * ,
.form-actions > * {
    min-width: 0;
}

.content,
.panel-card,
.location-section,
.product-manager-editor-dialog {
    min-width: 0;
}

.sidebar-toggle,
.sidebar-backdrop {
    display: none;
}

.panel-card,
.location-section,
.stat-card {
    overflow: hidden;
}

th,
td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.location-gallery-card label,
.inline-check,
.checkline {
    flex-wrap: wrap;
}

.form-actions,
.product-card-admin-actions {
    flex-wrap: wrap;
}

.product-card-admin-actions > *,
.form-actions > * {
    min-height: 44px;
}

.schedule-row > div {
    display: flex;
    gap: 12px;
    min-width: 0;
}

.schedule-row > div > input {
    min-width: 0;
}

.product-manager-copy,
.upload-preview-meta,
.product-card-admin-body,
.section-note {
    overflow-wrap: anywhere;
}

@media (max-width: 1024px) {
    .sidebar-toggle {
        display: inline-flex;
        margin-bottom: 12px;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, calc(100vw - 48px));
        max-width: calc(100vw - 48px);
        overflow-y: auto;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform .24s ease;
        box-shadow: 0 20px 40px rgba(8, 20, 24, .22);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(8, 20, 24, .42);
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .menu {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 8px;
        padding-bottom: 0;
    }

    .menu a,
    .menu-group {
        flex: 0 0 auto;
        white-space: normal;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .content,
    .sidebar {
        padding: 18px;
    }

    .topbar,
    .section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions,
    .form-actions,
    .product-manager-toolbar,
    .product-manager-editor-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-actions > *,
    .form-actions > *,
    .product-manager-toolbar > *,
    .product-manager-editor-actions > * {
        width: 100%;
    }

    .panel-card,
    .location-section,
    .stat-card {
        padding: 16px;
        border-radius: 16px;
    }

    .stat-card strong {
        font-size: 28px;
    }

    .location-gallery-grid,
    .upload-preview-grid,
    .product-manager-list,
    .product-manager-price-schedule-table,
    .product-manager-draft-gallery {
        grid-template-columns: 1fr;
    }

    .location-gallery-card img,
    .upload-preview-card img,
    .product-card-admin-media img,
    .product-draft-image img,
    .product-card-admin-placeholder {
        height: 200px;
    }

    .opening-hour-row,
    .schedule-row,
    .product-price-row {
        gap: 10px;
        padding: 14px;
        border: 1px solid #dbe5e8;
        border-radius: 14px;
        background: #fff;
    }

    .schedule-row > div {
        flex-direction: column;
    }

    .schedule-row > div > .ghost-button {
        width: 100%;
    }

    .permission-grid {
        gap: 10px;
    }

    .checkline {
        align-items: flex-start;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 12px;
    }

    tr {
        border: 1px solid #dbe5e8;
        border-radius: 14px;
        background: #fff;
        overflow: hidden;
    }

    td {
        padding: 10px 12px;
        border-bottom: 1px solid #eef3f4;
    }

    td:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 480px) {
    .content,
    .sidebar,
    .login-shell {
        padding: 14px;
    }

    .brand h2,
    .topbar h1 {
        font-size: 1.4rem;
    }

    .menu {
        gap: 6px;
        margin-top: 20px;
    }

    .menu a,
    .menu-group,
    .primary-button,
    .ghost-button,
    button {
        padding: 10px 14px;
    }

    .panel-card,
    .location-section,
    .stat-card,
    .login-card {
        padding: 14px;
        border-radius: 14px;
    }

    th,
    td {
        padding: 10px;
        font-size: 13px;
    }

    .location-gallery-card img,
    .upload-preview-card img,
    .product-card-admin-media img,
    .product-draft-image img,
    .product-card-admin-placeholder {
        height: 180px;
    }

    .product-manager-editor {
        padding: 10px;
    }

    .product-manager-editor-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }

    .product-manager-editor-header,
    .product-manager-editor-body,
    .product-manager-editor-actions {
        padding: 14px;
    }
}
