* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-dark: #202938;
    --line: #dfe5f1;
    --text: #172033;
    --muted: #6c7a92;
    --primary: #ff6b35;
    --primary-dark: #de5320;
    --secondary: #eef2f8;
    --success: #0ea77a;
    --warning: #f4a300;
    --danger: #dc3545;
    --shadow: 0 12px 30px rgba(18, 32, 51, 0.08);
    --radius: 20px;
    --bottom-space: 110px;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, sans-serif;
    min-height: 100%;
}

body {
    line-height: 1.45;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, textarea, select {
    font: inherit;
}

.hidden {
    display: none !important;
}

.mobile-shell {
    width: 100%;
    max-width: 740px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 14px 14px var(--bottom-space);
}

.topbar,
.admin-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 2px 16px;
}

.brand-kicker {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.topbar h1,
.admin-topbar h1,
.hero-card h2,
.auth-card h1 {
    margin: 4px 0 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.text-link {
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.search-box-card,
.content-section,
.summary-card,
.hero-card,
.menu-card,
.list-card,
.auth-card,
.admin-card,
.stat-card {
    background: var(--surface);
    border: 1px solid rgba(223, 229, 241, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.search-box-card,
.content-section,
.summary-card,
.hero-card,
.admin-card {
    padding: 16px;
    margin-bottom: 14px;
}

.search-input,
.text-input,
.table-select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    border-radius: 16px;
    padding: 14px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.text-input:focus,
.table-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.14);
}

.textarea-input {
    resize: vertical;
    min-height: 110px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.section-head span,
.muted-line,
.hero-card p,
.list-card p,
.auth-card p,
.admin-brand p {
    color: var(--muted);
    font-size: 0.92rem;
}

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

.menu-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    padding: 14px;
}

.menu-card-body h3,
.list-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.menu-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.menu-card-footer,
.list-card-main,
.summary-row,
.inline-actions,
.bottom-nav,
.qty-box,
.radio-group,
.admin-topbar,
.admin-nav,
.admin-sidebar,
.list-card-actions {
    display: flex;
    gap: 10px;
}

.menu-card-footer,
.list-card-main,
.summary-row,
.bottom-nav,
.admin-topbar {
    align-items: center;
    justify-content: space-between;
}

.menu-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.menu-card-footer strong {
    display: block;
    width: 100%;
    line-height: 1.35;
}

.menu-card-footer .qty-box {
    width: 100%;
    justify-content: space-between;
}

.qty-box {
    align-items: center;
    background: var(--secondary);
    border-radius: 999px;
    padding: 4px;
}

.qty-btn,
.mini-btn,
.primary-btn,
.secondary-btn,
.danger-outline-btn,
.auth-btn {
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.2s ease, background 0.2s ease;
}

.qty-btn:hover,
.mini-btn:hover,
.primary-btn:hover,
.secondary-btn:hover,
.danger-outline-btn:hover {
    transform: translateY(-1px);
}

.qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 1.1rem;
    font-weight: 700;
}

.qty-input {
    width: 42px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
}

.primary-btn,
.secondary-btn,
.danger-outline-btn,
.auth-btn {
    border-radius: 18px;
    padding: 14px 18px;
    font-weight: 700;
}

.primary-btn,
.auth-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover,
.auth-btn:hover {
    background: var(--primary-dark);
}

.secondary-btn {
    background: var(--secondary);
    color: var(--text);
}

.danger-outline-btn {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}

.danger-btn {
    background: rgba(220, 53, 69, 0.12);
    color: var(--danger);
}

.mini-btn {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--secondary);
    color: var(--text);
    font-size: 0.9rem;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(740px, 100%);
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: rgba(245, 247, 251, 0.94);
    backdrop-filter: blur(14px);
    z-index: 30;
}

.bottom-nav-total {
    min-width: 0;
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
}

.bottom-nav-total div {
    color: var(--muted);
    font-size: 0.84rem;
}

.bottom-nav-total strong {
    display: block;
    margin-top: 2px;
    font-size: 1.1rem;
}

.bottom-btn {
    flex: 0 0 44%;
    text-align: center;
}

.disabled-link {
    pointer-events: none;
    opacity: 0.5;
}

.stack-list {
    display: grid;
    gap: 12px;
}

.list-card {
    padding: 14px;
}

.list-card-actions {
    justify-content: flex-end;
    margin-top: 10px;
}

.compact-card {
    padding: 12px 14px;
}

.summary-row + .summary-row {
    margin-top: 12px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

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

.full-span {
    grid-column: 1 / -1;
}

.action-row {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.radio-group {
    flex-wrap: wrap;
}

.radio-card {
    flex: 1;
    min-width: 120px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-card input {
    accent-color: var(--primary);
}

.radio-card.compact {
    max-width: 180px;
}

.field-error {
    min-height: 20px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 0.84rem;
}

.empty-state {
    padding: 26px 18px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: #f9fbff;
}

.hero-card {
    text-align: center;
}

.success-card {
    border-color: rgba(14, 167, 122, 0.2);
    background: linear-gradient(180deg, #ffffff 0%, #f0fff9 100%);
}

.success-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 700;
}

.success-badge,
.status-pill.success {
    background: rgba(14, 167, 122, 0.12);
    color: var(--success);
}

.status-pill.warning {
    background: rgba(244, 163, 0, 0.14);
    color: #9c6400;
}

.status-pill.live {
    background: rgba(255, 107, 53, 0.12);
    color: var(--primary);
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 12px;
}

.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #d3d9e4;
    margin-top: 2px;
}

.timeline-dot.active {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.16);
}

.timeline-content {
    background: #f9fbff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 14px;
}

.timeline-content strong {
    display: block;
    margin-bottom: 4px;
}

.timeline-content p,
.timeline-content span {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.auth-card {
    width: min(100%, 460px);
    padding: 24px;
}

.auth-btn {
    width: 100%;
}

.helper-card,
.alert {
    margin-top: 16px;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid var(--line);
    background: #f9fbff;
}

.error-alert {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.06);
    border-color: rgba(220, 53, 69, 0.12);
}

.admin-body {
    background: #131b28;
}

.admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    flex-direction: column;
    padding: 24px 18px;
    background: var(--surface-dark);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-brand h2 {
    margin: 4px 0 2px;
}

.admin-nav {
    flex-direction: column;
    margin-top: 20px;
}

.admin-nav a {
    border-radius: 14px;
    padding: 12px 14px;
    color: rgba(255,255,255,0.8);
}

.admin-nav a.active,
.admin-nav a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.admin-main {
    padding: 22px;
    overflow-x: hidden;
}

.admin-card {
    margin-bottom: 18px;
}

.stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.stat-card strong {
    font-size: 1.35rem;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 700;
}

.table-select {
    min-width: 150px;
    padding: 10px 12px;
    border-radius: 12px;
}

.floating-toast {
    position: fixed;
    right: 16px;
    top: 16px;
    padding: 12px 16px;
    border-radius: 14px;
    color: #fff;
    background: rgba(23, 32, 51, 0.95);
    z-index: 200;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow);
}

.floating-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.floating-toast.success {
    background: rgba(14, 167, 122, 0.96);
}

.floating-toast.error {
    background: rgba(220, 53, 69, 0.96);
}

@media (max-width: 1024px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
    }

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

@media (max-width: 720px) {
    .two-col,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .section-head,
    .bottom-nav,
    .summary-row,
    .admin-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .bottom-btn {
        flex-basis: auto;
    }

    .admin-main {
        padding: 14px;
    }

    .admin-sidebar {
        padding: 16px 14px;
    }

    .data-table {
        min-width: 680px;
    }
}

@media (max-width: 420px) {
    .mobile-shell {
        padding: 12px 12px var(--bottom-space);
    }

    .menu-card {
        min-height: 170px;
    }

    .qty-input {
        width: 34px;
    }
}


.menu-card-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: var(--secondary);
    margin-bottom: 12px;
}

.menu-card-image,
.list-card-thumb,
.admin-food-preview,
.admin-table-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.list-card-main.with-image {
    align-items: stretch;
    gap: 12px;
}

.list-card-thumb-wrap {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--secondary);
}

.list-card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.file-input {
    padding: 11px 14px;
}

.checkbox-inline {
    justify-content: flex-start;
}

.admin-food-preview-wrap {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    background: var(--secondary);
    border: 1px solid var(--line);
    margin-bottom: 10px;
}

.admin-table-thumb {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    background: var(--secondary);
}

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

    .list-card-main.with-image,
    .list-card-content {
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .menu-grid {
        gap: 10px;
    }

    .menu-card {
        padding: 12px;
    }

    .list-card-thumb-wrap {
        flex-basis: 82px;
        width: 82px;
        height: 82px;
    }

    .list-card-content {
        flex-direction: column;
    }
}


.store-status-card {
    border-width: 1px;
}

.store-status-card.store-open {
    border-color: rgba(14, 167, 122, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f3fff9 100%);
}

.store-status-card.store-closed {
    border-color: rgba(220, 53, 69, 0.16);
    background: linear-gradient(180deg, #ffffff 0%, #fff6f7 100%);
}

.store-status-detail p {
    margin: 0 0 8px;
    font-weight: 700;
}

.store-status-panel {
    display: grid;
    gap: 12px;
}

.store-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f9fbff;
    border: 1px solid var(--line);
}

.status-text-open {
    color: var(--success);
}

.status-text-closed {
    color: var(--danger);
}

.qty-btn:disabled,
.qty-input:disabled,
.primary-btn:disabled,
.secondary-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

@media (max-width: 720px) {
    .store-status-line {
        flex-direction: column;
        align-items: stretch;
    }
}

.store-override-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.store-override-btn {
    width: 100%;
    min-height: 52px;
}

.store-override-btn.is-active {
    background: var(--primary);
    color: #fff;
}

.store-override-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 720px) {
    .store-override-switch {
        grid-template-columns: 1fr;
    }
}


.audio-preview {
    width: 100%;
    margin-top: 12px;
}


.pin-location-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.order-location-block {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.order-map-link {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
}

@media (max-width: 720px) {
    .pin-location-actions {
        flex-direction: column;
    }

    .pin-location-actions .secondary-btn,
    .pin-location-actions .order-map-link {
        width: 100%;
    }
}

.chat-section {
    padding-bottom: 18px;
}

.chat-messages {
    display: grid;
    gap: 14px;
    max-height: 420px;
    overflow-y: auto;
    padding: 14px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 107, 53, 0.10), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 167, 122, 0.10), transparent 28%),
        linear-gradient(180deg, #fbfdff 0%, #f3f7ff 100%);
    border: 1px solid rgba(223, 229, 241, 0.95);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
    scrollbar-width: thin;
    scrollbar-color: rgba(108, 122, 146, 0.35) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(108, 122, 146, 0.26);
    border-radius: 999px;
}

.chat-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-row.mine {
    justify-content: flex-end;
}

.chat-row.other {
    justify-content: flex-start;
}

.chat-bubble {
    position: relative;
    max-width: min(100%, 520px);
    border-radius: 22px;
    padding: 12px 14px 13px;
    box-shadow: 0 14px 26px rgba(18, 32, 51, 0.08);
    backdrop-filter: blur(6px);
}

.chat-bubble::after {
    content: "";
    position: absolute;
    bottom: 10px;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
}

.chat-bubble.mine {
    background: linear-gradient(180deg, #ff8d63 0%, #ff6b35 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom-right-radius: 8px;
}

.chat-bubble.mine::after {
    right: -5px;
    background: #ff6b35;
}

.chat-bubble.other {
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    border: 1px solid rgba(223, 229, 241, 0.95);
    border-bottom-left-radius: 8px;
}

.chat-bubble.other::after {
    left: -5px;
    background: rgba(255, 255, 255, 0.96);
    border-left: 1px solid rgba(223, 229, 241, 0.95);
    border-bottom: 1px solid rgba(223, 229, 241, 0.95);
}

.chat-bubble-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.78rem;
}

.chat-bubble-head strong {
    font-size: 0.84rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.chat-bubble-head span {
    white-space: nowrap;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 700;
}

.chat-bubble.mine .chat-bubble-head,
.chat-bubble.mine p {
    color: rgba(255,255,255,0.98);
}

.chat-bubble.mine .chat-bubble-head span {
    background: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.95);
}

.chat-bubble.other .chat-bubble-head {
    color: var(--muted);
}

.chat-bubble.other .chat-bubble-head span {
    background: #eef3fb;
    color: #607089;
}

.chat-bubble p {
    margin: 0;
    white-space: normal;
    word-break: break-word;
    font-size: 0.95rem;
    line-height: 1.58;
}

.chat-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(245,248,254,0.96) 100%);
    border: 1px solid rgba(223, 229, 241, 0.95);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
}

.chat-textarea {
    min-height: 108px;
    border-radius: 18px;
    background: #fff;
}

.chat-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.service-chat-shell {
    overflow: hidden;
}

.service-chat-grid {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
}

.service-chat-sidebar,
.service-chat-panel {
    border: 1px solid rgba(223, 229, 241, 0.95);
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8fe 100%);
    padding: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}

.service-chat-sidebar {
    display: grid;
    gap: 12px;
    align-content: start;
}

.service-chat-sidebar-head {
    display: grid;
    gap: 4px;
}

.service-chat-order-list {
    display: grid;
    gap: 10px;
    max-height: 720px;
    overflow-y: auto;
}

.service-chat-order-btn {
    border: 1px solid rgba(223, 229, 241, 0.95);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    padding: 13px;
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 7px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-chat-order-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(18, 32, 51, 0.08);
}

.service-chat-order-btn.active {
    border-color: rgba(255, 107, 53, 0.44);
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.10) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.10);
}

.service-chat-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.service-chat-unread {
    min-width: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.78rem;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.22);
}

.service-chat-preview {
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.45;
    min-height: 38px;
    word-break: break-word;
}

.service-chat-order-foot {
    font-size: 0.82rem;
}

.service-chat-panel {
    display: grid;
    gap: 12px;
}

.service-chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(223, 229, 241, 0.95);
}

.admin-chat-messages {
    min-height: 420px;
}

.order-location-block + .order-location-block {
    margin-top: 8px;
}

@media (max-width: 920px) {
    .service-chat-grid {
        grid-template-columns: 1fr;
    }

    .service-chat-order-list {
        max-height: 300px;
    }
}

@media (max-width: 720px) {
    .chat-bubble {
        max-width: calc(100% - 8px);
        padding: 11px 12px 12px;
    }

    .chat-bubble-head {
        grid-template-columns: 1fr;
    }

    .chat-bubble-head span {
        justify-self: start;
    }

    .chat-form-actions,
    .service-chat-header {
        flex-direction: column;
        align-items: stretch;
    }

    .chat-messages {
        max-height: 360px;
        padding: 12px;
    }

    .chat-form,
    .service-chat-sidebar,
    .service-chat-panel {
        border-radius: 20px;
    }
}

.voice-call-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 22px;
    border: 1px solid rgba(223, 229, 241, 0.95);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(243,247,255,0.98) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95);
}

.voice-call-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.voice-call-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.voice-call-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.voice-call-helper {
    font-size: 0.9rem;
    line-height: 1.5;
}

.voice-call-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.voice-call-duration,
.voice-call-incoming-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.voice-call-duration {
    background: rgba(96, 112, 137, 0.1);
    color: #4a5a72;
    border: 1px solid rgba(96, 112, 137, 0.12);
}

.voice-call-duration.is-live {
    background: rgba(14, 167, 122, 0.12);
    color: #0a7b59;
    border-color: rgba(14, 167, 122, 0.18);
}

.voice-call-incoming-badge {
    background: rgba(255, 107, 53, 0.14);
    color: #cf5a2c;
    border: 1px solid rgba(255, 107, 53, 0.18);
    animation: incomingPulse 1s ease-in-out infinite;
}

@keyframes incomingPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.24); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(255, 107, 53, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

.voice-call-panel.is-ringing {
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.voice-call-panel.is-connected {
    border-color: rgba(14, 167, 122, 0.35);
    box-shadow: 0 0 0 4px rgba(14, 167, 122, 0.08);
}

.service-chat-call-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(14, 167, 122, 0.14);
    color: #0a7b59;
    font-size: 0.72rem;
    font-weight: 700;
}

.service-chat-call-badge.ringing {
    background: rgba(255, 107, 53, 0.14);
    color: #cf5a2c;
}

@media (max-width: 720px) {
    .voice-call-head,
    .voice-call-actions,
    .voice-call-meta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .voice-call-actions .primary-btn,
    .voice-call-actions .secondary-btn,
    .voice-call-actions .danger-outline-btn {
        width: 100%;
    }
}
.service-chat-order-badges {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.settings-sound-grid {
    align-items: start;
}

.sound-upload-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sound-upload-card .helper-card {
    min-height: 100%;
}
