body { font-family: Arial, sans-serif; background:#f5f6f8; margin:0; color:#222; }
header { background:#1f2937; color:#fff; padding:16px 32px; }
header h1 { margin:0 0 12px 0; }
nav a { color:white; margin-right:16px; text-decoration:none; font-weight:bold; }
main { padding:24px 32px; }
.cards { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.card { background:white; padding:20px; border-radius:12px; box-shadow:0 1px 4px rgba(0,0,0,.08); }
.card .number { font-size:36px; font-weight:bold; }
.success{border-left:6px solid #22c55e}.danger{border-left:6px solid #ef4444}.warning{border-left:6px solid #f59e0b}
table { width:100%; border-collapse:collapse; background:white; margin-bottom:24px; }
th,td { padding:10px 12px; border-bottom:1px solid #ddd; vertical-align:top; }
th { background:#f0f0f0; text-align:left; }
.form { background:white; padding:16px; margin-bottom:24px; border-radius:12px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
input,select { padding:8px; min-width:180px; }
button,.btn { padding:8px 12px; cursor:pointer; border:1px solid #cbd5e1; background:#fff; border-radius:6px; text-decoration:none; color:#111; display:inline-block; font-size:14px; }
button:hover,.btn:hover { background:#f1f5f9; }
.danger-btn { border-color:#ef4444; color:#991b1b; }
.warning-btn { border-color:#f59e0b; color:#92400e; margin-bottom:12px; }
.actions { display:flex; gap:6px; flex-wrap:wrap; }
.row-danger { background:#fff1f2; }
.row-warning { background:#fffbeb; }
.problem { background:#fff7ed; border-left:4px solid #f97316; padding:8px; margin-bottom:6px; }
.thumb { max-width:160px; max-height:120px; border-radius:8px; border:1px solid #ddd; }
.panel { background:white; border-radius:12px; padding:16px; margin-bottom:20px; }
.hint,.muted { color:#666; margin-bottom:12px; }
.login-body { display:flex; align-items:center; justify-content:center; min-height:100vh; }
.login-card { background:white; padding:30px; border-radius:16px; box-shadow:0 4px 20px rgba(0,0,0,.12); width:320px; }
.login-card form { display:flex; flex-direction:column; gap:10px; }
.login-card input { min-width:0; }
.reminders-form input[name="text"] { min-width:420px; }
@media (max-width:900px){.cards{grid-template-columns:1fr 1fr;}main{padding:16px}.actions{display:block}.actions>*{margin-bottom:6px}}

.current-user {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.9;
}

.hint {
    background: #eef2ff;
    border-left: 4px solid #6366f1;
    padding: 10px 12px;
    border-radius: 8px;
}

.button-link {
    display: inline-block;
    padding: 8px 12px;
    background: #1f2937;
    color: white !important;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 6px;
}

.inline-form {
    display: inline-block;
    margin: 2px;
}

.actions {
    white-space: nowrap;
}

.danger-btn {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.badge {
    display: inline-block;
    background: #e5e7eb;
    border-radius: 999px;
    padding: 4px 8px;
    margin: 2px;
    font-size: 12px;
}

.wide-form {
    max-width: 900px;
}

.wide-form label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

.wide-form input[type="text"],
.wide-form input[type="password"] {
    display: block;
    width: 420px;
    max-width: 100%;
    margin-top: 6px;
}

.checkbox-line {
    font-weight: normal !important;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin: 14px 0 18px 0;
}

.permission-card {
    background: #f9fafb;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    font-weight: normal !important;
}

.permission-card input {
    min-width: auto;
    margin-right: 8px;
}

/* UI refresh for reminders and web-admin users */
.page-card,
.modern-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 22px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title h3 {
    margin: 0 0 6px 0;
}

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

.modern-form.two-cols {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    font-weight: 700;
    color: #111827;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    font: inherit;
}

.field textarea {
    resize: vertical;
}

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

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.primary-btn {
    background: #1f2937;
    border-color: #1f2937;
    color: #fff;
    font-weight: 700;
}

.primary-btn:hover {
    background: #111827;
}

.admin-user-shell {
    max-width: 1040px;
}

.toggle-card,
.superadmin-card,
.permission-modern-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
    padding: 14px 16px;
    cursor: pointer;
}

.toggle-card input,
.superadmin-card input,
.permission-modern-card input {
    min-width: auto;
    margin-top: 3px;
}

.toggle-card small,
.superadmin-card small {
    display: block;
    color: #6b7280;
    margin-top: 4px;
}

.compact-toggle {
    margin-top: 16px;
    max-width: 480px;
}

.superadmin-card {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border-color: #fdba74;
}

.superadmin-icon {
    font-size: 24px;
    line-height: 1;
}

.permissions-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.permission-modern-card {
    transition: 0.15s ease;
}

.permission-modern-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    background: rgba(245, 246, 248, 0.94);
    backdrop-filter: blur(6px);
    padding: 14px 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

@media (max-width: 800px) {
    .modern-form,
    .modern-form.two-cols {
        grid-template-columns: 1fr;
    }
}

/* Optimized Telegram users UI */
.users-toolbar {
    padding: 16px 18px;
}

.users-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.6fr) minmax(220px, .8fr) auto;
    gap: 14px;
    align-items: end;
}

.users-filter-actions {
    min-width: 180px;
}

.users-filter-actions .btn,
.users-filter-actions button {
    width: auto;
    margin-right: 6px;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 16px;
}

.user-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.06);
}

.user-card-warning {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fff, #fffbeb);
}

.user-card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.user-name {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}

.user-meta {
    color: #6b7280;
    margin-top: 4px;
    font-size: 14px;
}

.user-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px 0;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
}

.stat-pill.good {
    background: #dcfce7;
    color: #166534;
}

.stat-pill.bad {
    background: #fee2e2;
    color: #991b1b;
}

.muted-pill {
    background: #f1f5f9;
    color: #475569;
}

.access-section-title {
    font-weight: 800;
    margin: 6px 0 8px 0;
    color: #111827;
}

.access-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.access-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

.active-access {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.inactive-access {
    background: #f8fafc;
    border-color: #e2e8f0;
    opacity: 0.92;
}

.access-address {
    margin-top: 3px;
    color: #374151;
}

.access-date {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.empty-access {
    padding: 12px;
    background: #f8fafc;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
}

.inactive-details {
    margin-top: 12px;
}

.inactive-details summary {
    cursor: pointer;
    color: #475569;
    font-weight: 700;
    margin-bottom: 8px;
}

.user-profile-grid {
    display: grid;
    grid-template-columns: minmax(320px, .8fr) minmax(380px, 1.2fr);
    gap: 16px;
    align-items: start;
}

.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.profile-row span {
    color: #64748b;
}

.grant-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.detail-access-list .access-item {
    padding: 14px;
}

@media (max-width: 980px) {
    .users-filter-form,
    .user-profile-grid,
    .grant-form {
        grid-template-columns: 1fr;
    }
    .users-grid {
        grid-template-columns: 1fr;
    }
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.muted {
    color: #5f6470;
}

.primary-btn {
    background: #1f2937;
    color: white;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 700;
}

.system-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.panel-card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.log-box {
    background: #111827;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    max-height: 520px;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.log-line {
    white-space: pre-wrap;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 2px 0;
}

/* Checklist builder v2 */
.page-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:20px; }
.head-actions { display:flex; gap:8px; flex-wrap:wrap; }
.muted { color:#6b7280; }
.small-text { font-size:13px; }
.btn.primary, button.primary, .primary { background:#2563eb; color:#fff; border-color:#2563eb; }
.checklist-grid { display:grid; grid-template-columns:1fr; gap:14px; }
.check-card { background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:16px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.disabled-card { opacity:.62; }
.check-card-top { display:flex; gap:12px; align-items:flex-start; }
.order-badge { min-width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:#eef2ff; color:#3730a3; font-weight:700; }
.check-title-wrap { flex:1; }
.check-title-wrap h3 { margin:0 0 4px 0; }
.status-pill { padding:5px 10px; border-radius:999px; font-size:13px; white-space:nowrap; }
.status-on { background:#dcfce7; color:#166534; }
.status-off { background:#fee2e2; color:#991b1b; }
.options-row { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.answer-chip { display:inline-flex; gap:7px; align-items:center; padding:7px 10px; border-radius:999px; font-size:13px; border:1px solid #e5e7eb; background:#f9fafb; }
.answer-chip small { color:#6b7280; }
.chip-ok { background:#ecfdf5; border-color:#bbf7d0; }
.chip-problem { background:#fff7ed; border-color:#fed7aa; }
.chip-neutral { background:#f3f4f6; border-color:#d1d5db; }
.card-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; align-items:center; }
.card-actions form { display:inline; margin:0; }
.empty-state { background:#fff; border:1px dashed #cbd5e1; border-radius:16px; padding:28px; text-align:center; }
.builder-form { display:grid; gap:16px; max-width:1160px; }
.builder-section { background:#fff; border:1px solid #e5e7eb; border-radius:18px; padding:18px; }
.builder-section h3 { margin-top:0; }
.builder-section label { display:block; margin-bottom:12px; }
.builder-section label span { display:block; font-weight:600; margin-bottom:6px; }
.builder-section input[type="text"], .builder-section input[type="number"], .builder-section textarea, .builder-section select { width:100%; box-sizing:border-box; padding:10px 12px; border:1px solid #d1d5db; border-radius:10px; background:#fff; }
.form-grid.two { display:grid; grid-template-columns:180px 1fr; gap:16px; align-items:end; }
.toggle-line { display:flex!important; gap:10px; align-items:center; padding:10px 12px; border:1px solid #e5e7eb; border-radius:10px; margin-top:20px; }
.toggle-line input { min-width:auto; }
.toggle-line span { margin:0!important; }
.section-title-row { display:flex; justify-content:space-between; gap:12px; }
.option-list { display:grid; gap:10px; }
.option-editor { display:grid; grid-template-columns:46px minmax(220px, 1.4fr) minmax(140px,.7fr) minmax(160px,.8fr) minmax(160px,.8fr); gap:10px; align-items:end; padding:12px; border:1px solid #e5e7eb; border-radius:14px; background:#f9fafb; }
.option-number { width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:#fff; border:1px solid #e5e7eb; font-weight:700; margin-bottom:12px; }
.option-editor label { margin-bottom:0; }
.sticky-actions { position:sticky; bottom:0; display:flex; gap:10px; padding:14px 0; background:linear-gradient(transparent, #f5f6f8 35%); }
.telegram-preview-list { max-width:640px; display:grid; gap:14px; }
.telegram-bubble { background:#fff; border:1px solid #dbeafe; border-radius:18px; padding:16px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.telegram-bubble p { color:#374151; }
.telegram-buttons { display:grid; gap:8px; margin-top:12px; }
.telegram-buttons span { display:block; text-align:center; padding:10px; border:1px solid #bfdbfe; background:#eff6ff; border-radius:10px; }
@media (max-width: 900px) { .page-head { flex-direction:column; } .form-grid.two, .option-editor { grid-template-columns:1fr; } .option-number { margin-bottom:0; } }

/* checklist v2: cleaner builder + custom answer types */
.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}
.side-panel { position: sticky; top: 18px; }
.side-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.side-card h3 { margin-top: 0; }
.type-add-form {
    display: grid;
    gap: 10px;
    margin: 12px 0 16px;
}
.type-add-form input[type="text"] { width: 100%; min-width: 0; }
.mini-check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.answer-type-list { display: grid; gap: 8px; }
.answer-type-row {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
    background: #fafafa;
}
.answer-type-row b { display: block; margin-bottom: 6px; }
.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.type-problem { background: #fee2e2; color: #991b1b; }
.type-normal { background: #e0f2fe; color: #075985; }
.type-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.type-actions form { margin: 0; }
.type-actions button { padding: 6px 9px; font-size: 13px; }
.muted-row { opacity: .55; }
.compact-checklist { gap: 12px; }
.slim-card { padding: 14px; }
.compact-actions { gap: 6px; }
.compact-actions button, .compact-actions .btn { padding: 7px 10px; }
.clean-form { max-width: 1120px; }
.simple-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.panel-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.panel-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 12px; }
.clean-form .simple-panel > label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}
.clean-form .simple-panel > label span,
.clean-option label span {
    font-weight: 800;
    color: #111827;
    font-size: 14px;
}
.clean-form input[type="text"],
.clean-form textarea,
.clean-form select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 11px 12px;
    font: inherit;
}
.clean-form textarea {
    resize: vertical;
    min-height: 74px;
}
.clean-toggle { margin-top: 12px; }
.clean-options { display: grid; gap: 10px; }
.clean-option {
    grid-template-columns: 44px minmax(240px, 1.2fr) minmax(180px,.8fr) minmax(160px,.7fr) minmax(160px,.7fr);
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px;
    border-color: #dbe3ee;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.clean-option .option-prompt-label {
    grid-column: 2 / -1;
}
.hidden-option { display: none !important; }
@media (max-width: 1100px) {
    .split-layout { grid-template-columns: 1fr; }
    .side-panel { position: static; }
    .clean-option { grid-template-columns: 44px 1fr; }
}


/* refined auth screen */
.auth-body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 52%, #e0f2fe 100%);
}
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}
.auth-card h1 {
    text-align: center;
    margin: 0 0 22px;
    font-size: 28px;
}
.auth-form { display: grid; gap: 14px; }
.auth-form label span { display:block; font-weight:700; margin-bottom:7px; }
.auth-form input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 15px;
}
.auth-submit { width: 100%; padding: 12px 14px; border-radius: 12px; font-weight: 700; }
.auth-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 14px;
}

/* refined answer types panel */
.answer-types-panel { padding: 18px; }
.compact-title-row { margin-bottom: 10px; }
.type-add-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 12px;
    margin: 14px 0 16px;
}
.type-add-card label span { display: block; font-weight: 700; margin-bottom: 7px; }
.type-add-card input[type="text"] {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
}
.problem-switch {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px;
}
.problem-switch input { min-width: auto; margin-top: 4px; }
.problem-switch b { display: block; }
.problem-switch small { display: block; color: #64748b; margin-top: 2px; line-height: 1.35; }
.full-width { width: 100%; text-align: center; }
.modern-type-list { gap: 10px; }
.answer-type-card {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.type-main-line { display: flex; justify-content: space-between; gap: 12px; }
.type-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.type-disabled { background: #f3f4f6; color: #4b5563; }
.clean-type-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 12px;
}
.clean-type-actions form { margin: 0; }
.clean-type-actions button { width: 100%; }

/* Dashboard v2 / problems / health */
.problem-status-badge { white-space:nowrap; border-radius:999px; padding:6px 10px; background:#f1f5f9; font-weight:800; font-size:13px; }
.problem-filter-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 22px;
    display: grid;
    grid-template-columns: 190px minmax(200px, 1fr) minmax(200px, 1fr) auto;
    gap: 12px;
    align-items: end;
    box-shadow: 0 1px 5px rgba(15,23,42,.05);
}
.problem-filter-panel label {
    display: grid;
    gap: 7px;
}
.problem-filter-panel label span {
    font-weight: 800;
    color: #111827;
    font-size: 14px;
}
.problem-filter-panel input,
.problem-filter-panel select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 11px 12px;
    font: inherit;
}
.multi-select {
    position: relative;
}
.multi-select-trigger {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 10px 12px;
    font: inherit;
}
.multi-select-menu {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    max-height: 280px;
    overflow: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(15,23,42,.16);
    padding: 8px;
    user-select: none;
}
.multi-select-option {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 8px;
    align-items: center;
    padding: 7px 9px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.25;
}
.multi-select-option:hover {
    background: #f8fafc;
}
.multi-select-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.fake-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #94a3b8;
    background: #fff;
    box-shadow: inset 0 0 0 2px #fff;
}
.multi-select-option input:checked + .fake-check {
    background: #2563eb;
    border-color: #2563eb;
}
.field-error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 9px 10px;
    margin-top: 8px;
    font-size: 14px;
}
.compact-picker .multi-select-menu,
.reminders-modern-form .multi-select-menu {
    max-height: 360px;
}
.compact-picker .multi-select-option,
.reminders-modern-form .multi-select-option {
    font-size: 13px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.inline-settings-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}
.inline-settings-form label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}
.checklist-days-field {
    width: 260px;
    flex: 0 0 260px;
}
.checklist-days-field [data-day-picker-label] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.inline-settings-form .checklist-days-field .multi-select-option {
    font-weight: 500;
}
.days-select-menu {
    z-index: 45;
    max-height: 310px;
}
.photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}
.photo-thumb-btn {
    border: 0;
    padding: 0;
    background: transparent;
}
.photo-thumb-btn:hover {
    background: transparent;
}
.photo-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .86);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
}
.photo-lightbox[hidden] { display: none; }
.photo-lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.92);
    color: #111827;
    border-radius: 999px;
    width: 42px;
    height: 42px;
    font-size: 28px;
    line-height: 1;
}
.lightbox-close { top: 22px; right: 24px; }
.lightbox-prev { left: 28px; }
.lightbox-next { right: 28px; }
.problem-thread {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    display: grid;
    gap: 8px;
}
.thread-message {
    border-radius: 10px;
    padding: 9px 10px;
}
.thread-manager { background: #eef2ff; }
.thread-store { background: #ecfdf5; }
.thread-meta {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 3px;
}
.small-thread {
    margin-top: 8px;
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 13px;
}

/* Problems workspace */
.problem-filter-panel {
    grid-template-columns: 170px minmax(220px, .66fr) 160px minmax(280px, 1fr) auto;
    align-items: end;
    margin-bottom: 18px;
}
.compact-page-head {
    margin-bottom: 12px;
    align-items: center;
}
.compact-page-head h2 {
    margin: 0;
    color: #0f1f44;
    font-size: 34px;
    line-height: 1.05;
}
.compact-page-head .muted {
    margin: 6px 0 0;
    color: #667085;
    font-size: 16px;
}
.smart-filter-panel {
    background: rgba(255,255,255,.92);
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
    padding: 12px 14px;
    gap: 10px;
}
.compact-filter-bar {
    display: grid;
    grid-template-columns: 170px minmax(220px, .66fr) 160px minmax(280px, 1fr) auto;
    align-items: end;
}
.smart-filter-panel label,
.smart-filter-panel .filter-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}
.smart-filter-panel label > span,
.smart-filter-panel .filter-field > span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.smart-filter-panel input,
.smart-filter-panel select,
.smart-filter-panel .multi-select-trigger {
    min-height: 42px;
    border-radius: 10px;
    border-color: #c9d6e6;
    background-color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
    padding-top: 8px;
    padding-bottom: 8px;
}
.smart-filter-panel input:focus,
.smart-filter-panel select:focus,
.smart-filter-panel .multi-select-trigger:focus {
    border-color: #5b7cbd;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    outline: none;
}
.smart-filter-panel .primary-btn,
.smart-filter-panel > button[type="submit"] {
    min-height: 42px;
    align-self: end;
    border-radius: 9px;
}
.date-filter-field {
    max-width: 190px;
}
.status-filter-field {
    max-width: none;
}
.filter-store-picker .multi-select-trigger {
    min-width: 0;
}
.filter-store-picker .multi-select-menu {
    max-height: 420px;
}

.visual-filter-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 170px) minmax(230px, .72fr) minmax(160px, 180px) minmax(280px, 1fr) 138px;
    gap: 18px;
    align-items: center;
    min-height: 94px;
    padding: 22px;
    margin: 20px 0 22px;
    border: 1px solid rgba(207, 216, 230, .9);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.9)),
        radial-gradient(circle at 18% 0, rgba(219,234,254,.75), transparent 34%),
        radial-gradient(circle at 82% 0, rgba(237,242,255,.75), transparent 30%);
    box-shadow: 0 16px 42px rgba(15, 23, 42, .08);
}
.visual-filter-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}
.visual-filter-panel .filter-field,
.visual-filter-panel label {
    position: relative;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}
.visual-filter-panel > .filter-field > span,
.visual-filter-panel > label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.visual-filter-panel .filter-field::before,
.visual-filter-panel label::before {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid #d7e1ef;
    border-radius: 11px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    color: #0f1f44;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
    font-size: 27px;
    line-height: 1;
}
.visual-filter-panel .date-filter-field::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 0 0 3px rgba(37,99,235,.13), 0 10px 24px rgba(15,23,42,.1);
}
.visual-filter-panel .filter-field:has(.filter-store-picker)::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v10h16V10'/%3E%3Cpath d='M3 10h18l-2-6H5l-2 6Z'/%3E%3Cpath d='M8 20v-6h4v6'/%3E%3Cpath d='M16 14h1'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.visual-filter-panel .status-filter-field::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18M6 12h12M10 19h4'/%3E%3Ccircle cx='6' cy='5' r='1.5' fill='%230f1f44'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%230f1f44'/%3E%3Ccircle cx='10' cy='19' r='1.5' fill='%230f1f44'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.visual-filter-panel .search-filter-field::before {
    content: "";
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}
.visual-filter-panel input,
.visual-filter-panel select,
.visual-filter-panel .multi-select-trigger {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border: 1px solid #d6dfec;
    border-radius: 11px;
    background: rgba(255,255,255,.88);
    color: #0f172a;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.visual-filter-panel input[type="date"] {
    font-weight: 700;
}
.visual-filter-panel input::placeholder {
    color: #8a94a6;
}
.visual-filter-panel .primary-btn {
    min-height: 58px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(180deg, #1d2748, #111827);
    box-shadow: 0 14px 28px rgba(17,24,39,.22);
    font-size: 15px;
    font-weight: 900;
}
.visual-filter-panel .primary-btn:hover {
    background: linear-gradient(180deg, #24325e, #111827);
    transform: translateY(-1px);
}
.visual-filter-panel.is-loading .filter-search-control input {
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 3px rgba(37,99,235,.08);
}
.visual-filter-panel.is-loading .primary-btn {
    opacity: .86;
}
.visual-filter-panel .multi-select-menu {
    left: 74px;
    right: 0;
    top: calc(100% + 10px);
    border-radius: 14px;
    box-shadow: 0 22px 54px rgba(15,23,42,.18);
}

.icon-filter-panel {
    grid-template-columns: 72px 72px 72px minmax(72px, 1fr);
    gap: 20px;
    align-items: center;
}
.icon-filter-panel .filter-popover-control,
.icon-filter-panel .filter-search-control {
    position: relative;
    min-width: 0;
}
.icon-filter-panel label,
.icon-filter-panel .filter-field,
.icon-filter-panel .filter-popover-control,
.icon-filter-panel .filter-search-control {
    display: block;
}
.icon-filter-panel label::before,
.icon-filter-panel .filter-field::before {
    content: none;
}
.filter-icon-btn {
    position: relative;
    width: 72px;
    height: 72px;
    border: 1px solid #d2ddec;
    border-radius: 14px;
    background-color: rgba(255,255,255,.95);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}
.filter-icon-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .16s ease;
}
.filter-icon-btn:hover,
.filter-icon-btn:focus,
.filter-icon-btn:focus-visible,
.filter-popover-control.is-open .filter-icon-btn,
.filter-search-control.is-open .filter-icon-btn {
    border-color: #9eb6df;
    background-color: #f8fbff;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12), 0 14px 30px rgba(15,23,42,.12);
    transform: translateY(-1px);
    outline: none;
}
.filter-icon-btn:hover::before,
.filter-icon-btn:focus-visible::before,
.filter-popover-control.is-open .filter-icon-btn::before,
.filter-search-control.is-open .filter-icon-btn::before {
    transform: scale(.88);
}
.filter-date-btn::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M5 4h14a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
}
.filter-store-btn::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v10h16V10'/%3E%3Cpath d='M3 10h18l-2-6H5l-2 6Z'/%3E%3Cpath d='M8 20v-6h4v6'/%3E%3Cpath d='M16 14h1'/%3E%3C/svg%3E");
}
.filter-status-btn::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18M6 12h12M10 19h4'/%3E%3Ccircle cx='6' cy='5' r='1.5' fill='%230f1f44'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%230f1f44'/%3E%3Ccircle cx='10' cy='19' r='1.5' fill='%230f1f44'/%3E%3C/svg%3E");
}
.filter-search-btn::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
}
.filter-popover {
    position: absolute;
    z-index: 45;
    top: calc(100% + 12px);
    left: 0;
    min-width: 260px;
    border: 1px solid #dbe5f3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 54px rgba(15,23,42,.18);
    padding: 12px;
}
.filter-popover[hidden],
.icon-filter-panel .multi-select-menu[hidden] {
    display: none !important;
}
.filter-popover::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 24px;
    width: 14px;
    height: 14px;
    border-left: 1px solid #dbe5f3;
    border-top: 1px solid #dbe5f3;
    background: #fff;
    transform: rotate(45deg);
}
.filter-popover-title {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    margin: 2px 0 10px;
}
.icon-filter-panel .date-filter-popover input[type="date"] {
    width: 100%;
    min-height: 44px;
}
.icon-filter-panel .store-filter-popover {
    left: 0;
    right: auto;
    width: min(420px, calc(100vw - 80px));
    max-height: 430px;
}
.icon-filter-panel .multi-select-option input {
    width: auto;
    min-width: auto;
    min-height: auto;
    border: 0;
    box-shadow: none;
}
.icon-filter-panel .multi-select-option > span,
.icon-filter-panel .status-filter-option > span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}
.status-filter-popover {
    display: grid;
    gap: 6px;
}
.status-filter-option {
    display: grid !important;
    grid-template-columns: 18px 1fr;
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 10px;
    color: #0f172a;
    cursor: pointer;
}
.status-filter-option:hover {
    background: #f8fafc;
}
.status-filter-option input {
    width: auto;
    min-width: auto;
    min-height: auto;
    box-shadow: none;
}
.filter-search-control {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}
.filter-search-control input {
    width: 100%;
    min-width: 0;
    max-width: 0;
    min-height: 48px;
    opacity: 0;
    padding-left: 0;
    padding-right: 0;
    border-color: transparent;
    pointer-events: none;
    transition: max-width .24s ease, opacity .18s ease, padding .18s ease, border-color .18s ease;
}
.filter-search-control.is-open input {
    max-width: 680px;
    opacity: 1;
    padding-left: 14px;
    padding-right: 14px;
    border-color: #d6dfec;
    pointer-events: auto;
}
.problem-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #dbe3ef;
    margin: 2px 0 16px;
}
.problem-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 3px solid transparent;
    color: #475569;
    text-decoration: none;
    font-weight: 800;
}
.problem-tabs a.active {
    color: #0f172a;
    border-color: #1d4ed8;
}
.problem-tabs b,
.problem-total,
.thread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #e8f0ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 900;
}
.problem-work-list {
    display: grid;
    gap: 10px;
}
.problem-list-header,
.problem-work-main {
    display: grid;
    grid-template-columns: 86px minmax(210px, 1.15fr) minmax(220px, 1.2fr) minmax(210px, 1fr) minmax(210px, auto);
    gap: 14px;
    align-items: center;
}
.compact-question-view .problem-work-main {
    grid-template-columns: 86px minmax(230px, 1.2fr) minmax(260px, 1.4fr) minmax(210px, auto);
}
.problem-list-header {
    padding: 0 14px 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.problem-work-item {
    position: relative;
    background: #fff;
    border: 1px solid #d7e0ed;
    border-left: 5px solid #2563eb;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15,23,42,.06);
    overflow: hidden;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.problem-work-item:hover {
    border-color: #bfd0e6;
    box-shadow: 0 10px 28px rgba(15,23,42,.11);
    transform: translateY(-1px);
}
.problem-work-item.status-new { border-left-color: #ef4444; }
.problem-work-item.status-in_work { border-left-color: #f59e0b; }
.problem-work-item.status-resolved { border-left-color: #22c55e; }
.problem-work-item.status-rejected { border-left-color: #7c3aed; }
.problem-work-item.status-ignored { border-left-color: #94a3b8; }
.problem-work-item:has(.problem-details[open]) {
    border-color: #2563eb;
    background: #fbfdff;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
    outline: 3px solid rgba(37,99,235,.16);
    outline-offset: 0;
}
.problem-work-item:has(.problem-details[open]) + .problem-work-item {
    background: linear-gradient(90deg, #fff7ed 0, #fff 34%);
    border-color: #f59e0b;
    border-left-color: #f59e0b;
    box-shadow: 0 12px 34px rgba(245,158,11,.18);
}
.problem-work-item:has(.problem-details[open]) + .problem-work-item .open-label {
    border-color: #f59e0b;
    background: #fff7ed;
    color: #9a3412;
}
.problem-details > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
}
.problem-details > summary::-webkit-details-marker {
    display: none;
}
.problem-details[open] > summary {
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(90deg, #f8fbff, #fff);
}
.problem-time,
.problem-store-cell,
.problem-answer-cell,
.problem-row-actions {
    display: grid;
    gap: 3px;
}
.problem-time b {
    color: #0f172a;
    font-size: 16px;
}
.problem-time span,
.problem-store-cell span,
.problem-answer-cell span {
    color: #64748b;
    font-size: 13px;
}
.problem-store-cell b,
.problem-answer-cell b {
    color: #0f172a;
}
.problem-question-cell,
.problem-answer-cell span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.problem-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: end;
    align-items: center;
}
.problem-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 900;
    background: #eef2ff;
    color: #3730a3;
}
.problem-status-badge.status-new { background: #fee2e2; color: #991b1b; }
.problem-status-badge.status-in_work { background: #ffedd5; color: #9a3412; }
.problem-status-badge.status-resolved { background: #dcfce7; color: #166534; }
.problem-status-badge.status-rejected { background: #ede9fe; color: #5b21b6; }
.problem-status-badge.status-ignored { background: #e2e8f0; color: #334155; }
.new-reply-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    padding: 4px 9px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.new-reply-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
}
.new-reply-icon .ui-icon {
    width: 17px;
    height: 17px;
}
.open-label {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 7px 10px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    background: #fff;
}
.problem-details[open] .open-label {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}
.problem-question-layout {
    display: grid;
    grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.problem-question-list {
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 260px);
    overflow: auto;
    padding: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fbff, #f1f5f9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 22px rgba(15,23,42,.06);
}
.problem-question-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px 12px 12px 14px;
    border: 1px solid #d9e3f0;
    border-left: 4px solid transparent;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    box-shadow: 0 2px 7px rgba(15,23,42,.04);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}
.problem-question-link:hover {
    border-color: #b7c8df;
    box-shadow: 0 10px 24px rgba(15,23,42,.1);
    transform: translateY(-1px);
}
.problem-question-link span {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.problem-question-link.active {
    border-color: #2563eb;
    border-left-color: #2563eb;
    background: linear-gradient(90deg, #eff6ff, #fff);
    box-shadow: 0 12px 28px rgba(37,99,235,.14);
    font-weight: 800;
}
.problem-question-link.is-empty {
    opacity: .68;
    background: #f8fafc;
}
.problem-question-link.is-empty b {
    background: #f1f5f9;
    color: #64748b;
}
.problem-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.problem-section-head h3 {
    margin: 2px 0 0;
    font-size: 20px;
}

.ui-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.problem-details[open] > .problem-work-main {
    display: none;
}
.problem-open-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    background: #f8fafc;
}
.problem-open-header,
.problem-details-card,
.problem-chat-card,
.problem-actions-card {
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15,23,42,.07);
}
.problem-open-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 20px 22px;
}
.problem-open-header h3 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.25;
}
.problem-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 26px;
    align-items: center;
}
.problem-header-item {
    display: inline-grid;
    grid-template-columns: 22px auto;
    column-gap: 9px;
    row-gap: 2px;
    align-items: center;
    color: #2563eb;
}
.problem-header-item b,
.problem-header-item small {
    grid-column: 2;
}
.problem-header-item b {
    color: #0f172a;
    font-size: 15px;
}
.problem-header-item small {
    color: #64748b;
    font-size: 13px;
}
.problem-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.problem-status-form {
    margin: 0;
}
.status-chip {
    min-height: 44px;
    border-radius: 12px;
    padding: 8px 34px 8px 14px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
}
.status-chip.status-new {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
.status-chip.status-in-work {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}
.status-chip.status-resolved {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.status-chip.status-ignored {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}
.status-chip.status-rejected {
    background: #ede9fe;
    color: #5b21b6;
    border-color: #ddd6fe;
}
.problem-report-btn,
.problem-actions-row .btn,
.problem-actions-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 12px;
    white-space: nowrap;
}
.problem-report-btn {
    background: #111827;
    border-color: #111827;
    color: #fff;
    font-weight: 900;
}
.problem-report-btn:hover {
    background: #1f2937;
}
.problem-kebab-btn,
.problem-close-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: #0f172a;
}
.problem-close-btn {
    border: 1px solid #dbe5f3;
    background: #fff;
    color: #64748b;
    border-radius: 12px;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.problem-close-btn:hover,
.problem-close-btn:focus-visible {
    border-color: #fecaca;
    background: #fff1f2;
    color: #dc2626;
    transform: translateY(-1px);
    outline: none;
}
.problem-close-btn .ui-icon {
    width: 19px;
    height: 19px;
}
.problem-open-grid {
    display: grid;
    grid-template-columns: minmax(340px, .9fr) minmax(520px, 1.4fr);
    gap: 16px;
    align-items: stretch;
}
.problem-details-card,
.problem-chat-card,
.problem-actions-card {
    padding: 20px;
}
.problem-details-card h4,
.problem-chat-card h4,
.problem-actions-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 18px;
}
.section-icon {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
}
.detail-row {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f7;
}
.detail-row:last-child {
    border-bottom: 0;
}
.detail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
}
.detail-answer {
    background: #dcfce7;
    color: #16a34a;
}
.detail-comment {
    background: #fff7ed;
    color: #f59e0b;
}
.detail-store {
    background: #f5f3ff;
    color: #7c3aed;
}
.detail-user {
    background: #eff6ff;
    color: #2563eb;
}
.detail-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.detail-value {
    margin-top: 4px;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.42;
}
.problem-chat-card {
    min-height: 360px;
    display: flex;
    flex-direction: column;
}
.chat-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}
.chat-message {
    max-width: 78%;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 14px;
}
.chat-message-store {
    align-self: flex-start;
    background: #fff7ed;
    border-color: #fed7aa;
}
.chat-message-responsible {
    align-self: flex-end;
    background: #eff6ff;
    border-color: #bfdbfe;
}
.chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 6px;
}
.chat-meta b {
    color: #0f172a;
}
.chat-author {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}
.chat-text {
    color: #0f172a;
    line-height: 1.45;
}
.chat-empty {
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}
.chat-compose-form {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 52px;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}
.chat-compose-form textarea {
    min-height: 46px;
    max-height: 120px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
    line-height: 1.35;
}
.attach-btn,
.send-btn {
    display: inline-grid;
    place-items: center;
    height: 46px;
    border-radius: 12px;
}
.attach-btn {
    background: #fff;
    border: 1px solid #dbe5f3;
    color: #2563eb;
}
.send-btn {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 10px 24px rgba(37,99,235,.22);
}
.problem-actions-card {
    margin: 0;
}
.manager-note-field {
    display: grid;
    gap: 8px;
}
.manager-note-field span {
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}
.manager-note-field textarea {
    width: 100%;
    min-height: 76px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px 14px;
}
.problem-actions-row {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.problem-actions-row .primary-btn {
    background: #111827;
    border-color: #111827;
}

@media (max-width: 1180px) {
    .problem-filter-panel,
    .compact-filter-bar,
    .problem-open-grid,
    .problem-question-layout {
        grid-template-columns: 1fr;
    }
    .problem-open-header {
        grid-template-columns: 1fr;
    }
    .problem-header-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .date-filter-field,
    .status-filter-field {
        max-width: none;
    }
    .problem-question-list {
        max-height: none;
    }
}
@media (max-width: 980px) {
    .icon-filter-panel {
        grid-template-columns: 72px 72px 72px 1fr;
    }
    .filter-search-control {
        grid-column: 1 / -1;
    }
    .filter-search-control input {
        max-width: 100%;
        opacity: 1;
        padding-left: 14px;
        padding-right: 14px;
        border-color: #d6dfec;
        pointer-events: auto;
    }
    .problem-list-header {
        display: none;
    }
    .problem-work-main,
    .compact-question-view .problem-work-main {
        grid-template-columns: 1fr;
        gap: 9px;
    }
    .problem-row-actions {
        justify-content: start;
    }
    .problem-tabs {
        overflow-x: auto;
    }
}
.release-toast {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 60;
    width: min(420px, calc(100vw - 36px));
    background: #fff;
    border: 1px solid #dbeafe;
    border-left: 6px solid #2563eb;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(15,23,42,.18);
    padding: 14px;
    display: grid;
    gap: 12px;
}
.release-toast span {
    display: block;
    color: #64748b;
    margin-top: 4px;
}
.release-toast-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.release-toast-actions form { margin: 0; }
.release-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(15,23,42,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.release-modal-backdrop[hidden] { display: none; }
.release-modal {
    width: min(620px, 100%);
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 80px rgba(15,23,42,.24);
    padding: 20px;
}
.release-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.release-modal-head h2 { margin: 4px 0 0; }
.icon-close {
    border: 0;
    background: #f1f5f9;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    font-size: 24px;
}
.release-body {
    margin: 16px 0;
    display: grid;
    gap: 8px;
}
.release-body p {
    margin: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
}
.release-modal-actions {
    display: flex;
    justify-content: flex-end;
}

/* Dashboard control screen */
.dashboard-page {
    display: grid;
    gap: 20px;
}
.dashboard-page-head {
    margin: 4px 0 0;
}
.dashboard-page-head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.15;
}
.dashboard-page-head p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 16px;
}
.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}
.dashboard-summary-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 110px;
    padding: 22px 24px;
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.dashboard-summary-card .summary-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
}
.dashboard-summary-card .summary-icon .ui-icon {
    width: 34px;
    height: 34px;
    stroke-width: 1.8;
}
.dashboard-summary-card .summary-title {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}
.dashboard-summary-card .summary-number {
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}
.summary-success .summary-icon {
    background: #dcfce7;
    color: #16a34a;
    box-shadow: inset 0 0 0 8px #bbf7d0;
}
.summary-success .summary-number {
    color: #16a34a;
}
.summary-missing .summary-icon {
    background: #fef3c7;
    color: #f59e0b;
    box-shadow: inset 0 0 0 8px #fde68a;
}
.summary-missing .summary-number {
    color: #f59e0b;
}
.summary-progress .summary-icon {
    background: #dbeafe;
    color: #2563eb;
    box-shadow: inset 0 0 0 8px #bfdbfe;
}
.summary-progress .summary-number {
    color: #2563eb;
}
.summary-problem .summary-icon {
    background: #fee2e2;
    color: #ef4444;
    box-shadow: inset 0 0 0 8px #fecaca;
}
.summary-problem .summary-number {
    color: #e11d48;
}
.send-checklist-card,
.dashboard-filter-card,
.dashboard-table-card {
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.send-checklist-card {
    display: grid;
    grid-template-columns: minmax(320px, .75fr) minmax(420px, 1.25fr);
    gap: 22px;
    align-items: center;
    padding: 24px;
}
.send-card-left {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}
.send-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: #dbeafe;
    color: #2563eb;
}
.send-icon .ui-icon {
    width: 34px;
    height: 34px;
}
.send-card-left h3,
.dashboard-filter-card h3 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
}
.send-card-left p {
    margin: 6px 0 0;
    color: #64748b;
    line-height: 1.35;
}
.send-card-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px;
    gap: 14px;
    align-items: center;
}
.dashboard-icon-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 0 14px;
    background: #fff;
    color: #334155;
}
.dashboard-icon-field > .ui-icon {
    color: #0f1f44;
}
.dashboard-icon-field > input,
.dashboard-icon-field > select {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    outline: 0;
}
.send-card-controls .primary-btn,
.dashboard-refresh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, #14233f, #0f172a);
    color: #fff;
    box-shadow: 0 14px 28px rgba(15,23,42,.2);
    font-weight: 900;
}
.dashboard-filter-card {
    padding: 22px;
}
.dashboard-filter-card h3 {
    margin-bottom: 16px;
}
.dashboard-filter-row {
    display: grid;
    grid-template-columns: 220px 280px 250px minmax(280px, 1fr) 210px;
    gap: 12px;
    align-items: center;
}
.dashboard-store-filter {
    overflow: visible;
}
.dashboard-store-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    font: inherit;
    padding: 0;
}
.dashboard-store-trigger:hover,
.dashboard-store-trigger:focus {
    background: transparent;
    outline: 0;
}
.dashboard-store-trigger [data-store-picker-label] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-store-menu {
    left: 0;
    right: auto;
    top: calc(100% + 10px);
    width: min(440px, calc(100vw - 80px));
    max-height: 420px;
    border-radius: 14px;
    box-shadow: 0 22px 54px rgba(15,23,42,.18);
}
.send-target-picker .dashboard-store-menu {
    width: min(560px, calc(100vw - 80px));
}
.dashboard-store-filter .field-error {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 48;
    width: max-content;
    max-width: min(420px, calc(100vw - 80px));
}
.dashboard-search-field {
    min-width: 280px;
}
.dashboard-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
}
.dashboard-secondary-btn:hover {
    background: #f8fafc;
}
.dashboard-table-card {
    overflow: hidden;
}
.dashboard-status-table {
    width: 100%;
    border-collapse: collapse;
}
.dashboard-status-table th {
    padding: 14px 22px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
}
.dashboard-status-table td {
    padding: 12px 22px;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}
.dashboard-status-table tr:last-child td {
    border-bottom: 0;
}
.dashboard-status-table tr.has-problem {
    background: linear-gradient(90deg, rgba(254,242,242,.5), #fff 32%);
}
.dashboard-store-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dashboard-store-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
}
.dashboard-store-name {
    color: #0f172a;
    font-weight: 900;
}
.dashboard-store-city {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    color: #64748b;
    font-size: 13px;
}
.dashboard-store-city .ui-icon {
    width: 14px;
    height: 14px;
}
.dashboard-admin-cell,
.dashboard-time-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
}
.dashboard-admin-cell .ui-icon,
.dashboard-time-cell .ui-icon {
    color: #64748b;
}
.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}
.dashboard-status-badge .ui-icon {
    width: 17px;
    height: 17px;
}
.dashboard-status-badge.status-completed {
    background: #dcfce7;
    color: #166534;
}
.dashboard-status-badge.status-missing {
    background: #fef3c7;
    color: #92400e;
}
.dashboard-status-badge.status-progress {
    background: #dbeafe;
    color: #1d4ed8;
}
.dashboard-status-badge.status-problem {
    background: #fee2e2;
    color: #991b1b;
}
.dashboard-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
}
.dashboard-icon-action:hover {
    background: #f8fafc;
}
.dashboard-icon-action.disabled {
    color: #94a3b8;
    cursor: not-allowed;
}
.dashboard-empty-state {
    padding: 28px;
    color: #64748b;
    text-align: center;
}

@media (max-width: 1280px) {
    .dashboard-filter-row {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
    .dashboard-search-field {
        min-width: 0;
    }
}
@media (max-width: 1100px) {
    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .send-checklist-card {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .dashboard-summary-grid,
    .dashboard-filter-row,
    .send-card-controls {
        grid-template-columns: 1fr;
    }
    .dashboard-summary-card {
        grid-template-columns: 58px 1fr auto;
    }
    .dashboard-table-card {
        overflow-x: auto;
    }
    .dashboard-status-table {
        min-width: 760px;
    }
}
.health-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:14px; margin-bottom:20px; }
.health-card { background:white; border:1px solid #e5e7eb; border-radius:16px; padding:16px; box-shadow:0 1px 4px rgba(15,23,42,.06); }
.health-card.ok { border-left:6px solid #22c55e; }
.health-card.warn { border-left:6px solid #f59e0b; }
.health-card.bad { border-left:6px solid #ef4444; }
.health-title { color:#64748b; font-weight:800; font-size:13px; text-transform:uppercase; letter-spacing:.04em; }
.health-value { font-size:20px; font-weight:900; margin:6px 0; }
@media (max-width:1100px){ .health-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:700px){ .health-grid{grid-template-columns:1fr;} }
@media (max-width:900px){ .problem-filter-panel{grid-template-columns:1fr;} }

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin: 12px 0 18px 0;
    background: #eef2ff;
    border-left: 4px solid #4f46e5;
}
.danger-alert {
    background: #fff1f2;
    border-left-color: #e11d48;
}
.inline-grid-form {
    display: grid;
    grid-template-columns: 160px 220px minmax(320px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.inline-grid-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}
.inline-grid-form label span {
    font-size: 13px;
    color: #4b5563;
}
.inline-grid-form input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.section-header-row {
    margin: 22px 0 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.archive-title {
    margin-top: 34px;
}
.archived-row {
    opacity: 0.75;
}
.empty-box {
    background: white;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    color: #64748b;
}
@media (max-width: 1000px) {
    .inline-grid-form {
        grid-template-columns: 1fr;
    }
}
.center-text { text-align: center; }
.password-force-toggle { margin-top: 14px; border-color: #bfdbfe; background: #eff6ff; }
.warning-badge { background: #fef3c7 !important; color: #92400e !important; }

/* Store session report */
.report-page {
    display: grid;
    gap: 16px;
}
.report-back-row {
    margin-bottom: -2px;
}
.report-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-weight: 700;
    text-decoration: none;
}
.report-back-link:hover {
    color: #1d4ed8;
}
.report-back-link .ui-icon {
    width: 17px;
    height: 17px;
}
.report-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
}
.report-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.18;
}
.report-hero p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 16px;
}
.report-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.report-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 900;
}
.report-status-badge.status-completed {
    background: #dcfce7;
    color: #166534;
}
.report-status-badge.status-in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}
.report-status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}
.report-status-badge.problems {
    background: #fee2e2;
    color: #991b1b;
}
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
}
.report-summary-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid #e1e8f2;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15,23,42,.06);
}
.report-summary-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #2563eb;
    background: #eff6ff;
}
.report-summary-icon.success,
.report-summary-icon.done {
    color: #16a34a;
    background: #dcfce7;
}
.report-summary-icon.user {
    color: #1d4ed8;
    background: #eff6ff;
}
.report-summary-icon.time {
    color: #475569;
    background: #f1f5f9;
}
.report-summary-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.report-summary-value {
    margin-top: 3px;
    color: #0f172a;
    font-weight: 900;
}
.report-actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.report-actions-bar form {
    margin: 0;
}
.report-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
    color: #0f172a;
    font-weight: 900;
    text-decoration: none;
}
.report-btn:hover {
    background: #f8fafc;
}
.report-btn.warning-btn {
    border-color: #fdba74;
    background: #fff7ed;
    color: #9a3412;
}
.report-mini-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.report-mini-stats span {
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}
.report-table-card {
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.report-table {
    width: 100%;
    border-collapse: collapse;
}
.report-table th {
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
}
.report-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #eef2f7;
    color: #0f172a;
    vertical-align: top;
}
.report-table tr:last-child td {
    border-bottom: 0;
}
.report-table tr.problem-row td {
    background: #fff7ed;
}
.report-table tr.problem-row td:first-child {
    border-left: 4px solid #f97316;
}
.report-question-cell {
    min-width: 280px;
    font-weight: 700;
    line-height: 1.36;
}
.answer-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}
.answer-badge .ui-icon {
    width: 16px;
    height: 16px;
}
.answer-ok {
    background: #dcfce7;
    color: #166534;
}
.answer-warning {
    background: #fef3c7;
    color: #92400e;
}
.answer-problem {
    background: #fee2e2;
    color: #991b1b;
}
.answer-neutral {
    background: #e0f2fe;
    color: #075985;
}
.comment-cell {
    color: #334155;
    line-height: 1.4;
}
.empty-value {
    color: #94a3b8;
}
.photo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 0;
}
.photo-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
.report-problem-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.report-problem-status.status-new {
    background: #fee2e2;
    color: #991b1b;
}
.report-problem-status.status-in-work {
    background: #fef3c7;
    color: #92400e;
}
.report-problem-status.status-resolved {
    background: #dcfce7;
    color: #166534;
}
.report-problem-status.status-ignored {
    background: #f1f5f9;
    color: #475569;
}
.report-problem-status.status-rejected {
    background: #ede9fe;
    color: #5b21b6;
}
.time-cell {
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .report-summary-grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }
    .report-table-card {
        overflow-x: auto;
    }
    .report-table {
        min-width: 1040px;
    }
}
@media (max-width: 620px) {
    .report-hero {
        flex-direction: column;
    }
    .report-hero-badges {
        justify-content: flex-start;
    }
    .report-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* Customer feedback module */
.feedback-page {
    color: #020b24;
}
.feedback-page .dashboard-page-head,
.feedback-builder-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}
.feedback-head-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
}
.feedback-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #c9d6e6;
    border-radius: 11px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15,23,42,.08);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.feedback-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(15,23,42,.13);
}
.feedback-action-btn .ui-icon {
    width: 18px;
    height: 18px;
}
.feedback-action-survey {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    border-color: #2563eb;
    color: #fff;
}
.feedback-action-qr {
    background: linear-gradient(180deg, #16a34a, #15803d);
    border-color: #16a34a;
    color: #fff;
}
.feedback-action-sheet {
    background: linear-gradient(180deg, #0f766e, #0f5f59);
    border-color: #0f766e;
    color: #fff;
}
.feedback-action-report {
    background: linear-gradient(180deg, #7c3aed, #5b21b6);
    border-color: #7c3aed;
    color: #fff;
}
.feedback-action-analytics {
    background: linear-gradient(180deg, #0ea5e9, #2563eb);
    border-color: #0ea5e9;
    color: #fff;
}
.feedback-action-back {
    background: #fff;
    color: #0f1f44;
}
.feedback-filter-panel {
    grid-template-columns: 72px 72px 72px 72px minmax(72px, 1fr);
}
.filter-heart-btn::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='none' stroke='%230f1f44' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.6l-1-1a5.5 5.5 0 1 0-7.8 7.8l1 1L12 21l7.8-7.6 1-1a5.5 5.5 0 0 0 0-7.8Z'/%3E%3C/svg%3E");
}
.feedback-filter-panel .filter-search-control input {
    min-width: min(420px, calc(100vw - 520px));
}
.feedback-filter-panel .filter-popover {
    text-align: left;
}
.feedback-summary-grid {
    margin-top: 16px;
}
.feedback-list-card,
.feedback-editor-card,
.feedback-store-panel {
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    margin-top: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}
.feedback-list-header,
.qr-list-header {
    display: grid;
    grid-template-columns: 150px 1.5fr 1fr 150px 150px;
    gap: 16px;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.feedback-row {
    position: relative;
    border-bottom: 1px solid #e8eef6;
    transition: background-color .18s ease, box-shadow .18s ease;
}
.feedback-row:last-child {
    border-bottom: 0;
}
.feedback-row summary {
    display: grid;
    grid-template-columns: 150px 1.5fr 1fr 150px 150px;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
}
.feedback-row summary::-webkit-details-marker {
    display: none;
}
.feedback-row[open] summary {
    background: linear-gradient(90deg, rgba(239,246,255,.96), rgba(255,255,255,.98));
}
.feedback-row[open] {
    margin: 10px 0;
    border: 1px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(120deg, #38bdf8, #22c55e, #f59e0b, #ef4444) border-box;
    box-shadow: 0 0 0 3px rgba(56,189,248,.12), 0 18px 44px rgba(15,23,42,.12);
    overflow: hidden;
}
.feedback-row.sentiment-negative summary {
    border-left: 4px solid #ef4444;
}
.feedback-row.sentiment-neutral summary {
    border-left: 4px solid #f59e0b;
}
.feedback-row.sentiment-positive summary {
    border-left: 4px solid #22c55e;
}
.feedback-row-body {
    padding: 0 20px 20px 20px;
}
.feedback-row[open] .feedback-row-body {
    background: linear-gradient(180deg, #fff, #f8fbff);
}
.feedback-answer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.feedback-answer-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}
.feedback-answer-item span {
    display: block;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 7px;
}
.feedback-answer-item b {
    color: #0f172a;
}
.feedback-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}
.feedback-badge.sentiment-positive {
    background: #dcfce7;
    color: #166534;
}
.feedback-badge.sentiment-neutral {
    background: #fef3c7;
    color: #92400e;
}
.feedback-badge.sentiment-negative {
    background: #fee2e2;
    color: #991b1b;
}
.review-status-new {
    background: #dbeafe;
    color: #1e40af;
}
.review-status-in_progress {
    background: #fef3c7;
    color: #92400e;
}
.review-status-resolved {
    background: #dcfce7;
    color: #166534;
}
.review-status-ignored {
    background: #f1f5f9;
    color: #475569;
}
.feedback-status-form {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 12px;
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
}
.feedback-status-form label,
.feedback-question-form label,
.feedback-question-edit label,
.feedback-survey-title-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 900;
    color: #0f172a;
}
.feedback-status-form select,
.feedback-status-form textarea,
.feedback-question-form input,
.feedback-question-form select,
.feedback-question-form textarea,
.feedback-question-edit input,
.feedback-question-edit select,
.feedback-question-edit textarea,
.feedback-survey-title-form input {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}
.feedback-note-field textarea,
.feedback-question-edit textarea {
    resize: vertical;
}
.feedback-editor-card {
    padding: 20px;
}
.feedback-survey-card {
    padding: 18px;
    margin-bottom: 18px;
}
.feedback-survey-hero {
    margin-top: 18px;
}
.feedback-survey-title-form,
.feedback-question-form {
    display: grid;
    grid-template-columns: 1fr 180px auto;
    gap: 14px;
    align-items: end;
}
.feedback-question-form {
    grid-template-columns: 1fr 180px auto;
}
.feedback-question-form .full-width,
.feedback-question-edit .full-width {
    grid-column: 1 / -1;
}
.checkbox-pill {
    flex-direction: row !important;
    align-items: center;
    gap: 8px !important;
    border: 1px solid #dbe5f2;
    border-radius: 999px;
    padding: 10px 12px;
    background: #f8fafc;
}
.checkbox-pill input {
    width: auto;
    min-width: auto;
}
.feedback-question-list {
    display: grid;
    gap: 14px;
}
.feedback-builder-layout {
    margin-top: 18px;
}
.feedback-builder-side {
    top: 18px;
}
.feedback-builder-head h2 {
    margin: 0;
}
.feedback-survey-title-form {
    grid-template-columns: minmax(260px, 1fr) 180px auto;
}
.feedback-survey-title-form label span,
.feedback-card-editor label span,
.feedback-question-title-field span,
.feedback-add-question-form label span {
    display: block;
    margin-bottom: 7px;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}
.feedback-question-title-field input {
    width: 100%;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f8fafc;
    padding: 10px 12px;
    font: inherit;
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
}
.feedback-question-settings {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 110px minmax(180px, .6fr);
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.feedback-question-settings label,
.feedback-option-builder label {
    display: grid;
    gap: 7px;
    margin: 0;
    font-weight: 900;
}
.feedback-question-settings label span,
.feedback-builder-label {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}
.feedback-question-settings input,
.feedback-question-settings select,
.feedback-option-row input,
.feedback-option-row select,
.rating-type-cell select,
.feedback-type-card input,
.feedback-type-card select,
.feedback-type-card-bottom input {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    font: inherit;
}
.feedback-option-builder {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #fff;
}
.feedback-option-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 190px;
    gap: 10px;
    align-items: center;
}
.feedback-option-row.is-empty {
    opacity: .78;
}
.rating-type-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: 10px;
}
.rating-type-cell {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.rating-type-cell > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 900;
}
.text-question-note {
    grid-template-columns: 1fr;
    color: #475569;
}
.text-question-note b {
    color: #0f172a;
}
.feedback-question-title-field input:focus {
    border-color: #9eb6df;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.feedback-question-card {
    border-color: #dbe5f2;
}
.feedback-question-card .check-card-top {
    align-items: flex-start;
}
.feedback-option-preview {
    margin: 14px 0 2px;
}
.feedback-card-editor {
    display: grid;
    grid-template-columns: minmax(160px, .8fr) 110px 160px;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.feedback-types-constructor {
    display: grid;
    gap: 12px;
}
.feedback-types-constructor h3 {
    margin: 0;
}
.feedback-type-add-form {
    margin: 0;
}
.feedback-type-card {
    display: grid;
    gap: 9px;
}
.feedback-type-card-bottom {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) 80px auto;
    gap: 8px;
    align-items: center;
}
.feedback-type-card-bottom .checkbox-pill {
    padding: 8px 10px;
}
.feedback-active-toggle {
    margin-top: 0;
    min-height: 42px;
}
.feedback-question-clean-form {
    max-width: 1120px;
}
.feedback-clean-option {
    grid-template-columns: 44px minmax(260px, 1fr) minmax(220px, .65fr);
}
.feedback-rating-editor {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.feedback-question-clean-form [hidden] {
    display: none !important;
}
.feedback-report-toolbar {
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}
.feedback-range-toolbar {
    display: grid;
    grid-template-columns: minmax(320px, auto) 210px 210px auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin: 20px 0;
}
.feedback-period-tabs {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid #d2ddec;
    border-radius: 14px;
    background: #f8fbff;
    padding: 6px;
}
.feedback-period-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #0f1f44;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.feedback-period-tabs button:hover,
.feedback-period-tabs button:focus-visible {
    background: #eef5ff;
    outline: none;
}
.feedback-period-tabs button.is-active {
    background: #0f1f44;
    color: #fff;
    box-shadow: 0 10px 22px rgba(15,31,68,.18);
}
.report-date-pill {
    display: inline-grid;
    grid-template-columns: auto minmax(150px, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 54px;
    border: 1px solid #d2ddec;
    border-radius: 12px;
    background: #fff;
    padding: 0 16px;
    box-shadow: 0 10px 24px rgba(15,23,42,.05);
}
.report-date-pill span {
    color: #52637f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.report-date-pill input {
    border: 0;
    min-width: 0;
    font: inherit;
    font-weight: 900;
    color: #0f1f44;
    outline: none;
}
.report-submit-btn {
    cursor: pointer;
}
.feedback-report-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}
.feedback-report-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 118px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.feedback-report-stat span {
    min-width: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
}
.feedback-report-stat b {
    flex: 0 0 auto;
    font-size: 38px;
    line-height: 1;
    font-weight: 950;
}
.feedback-report-stat.is-total b { color: #2563eb; }
.feedback-report-stat.is-positive b { color: #16a34a; }
.feedback-report-stat.is-neutral b { color: #f59e0b; }
.feedback-report-stat.is-negative b { color: #e11d48; }
.feedback-report-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}
.feedback-report-card {
    padding: 18px;
}
.feedback-report-card h3 {
    margin: 0 0 14px;
}
.feedback-report-list {
    display: grid;
    gap: 10px;
}
.feedback-report-list div,
.feedback-report-status-link,
.feedback-report-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px 110px;
    gap: 12px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 11px 12px;
}
.feedback-report-list div,
.feedback-report-status-link {
    grid-template-columns: minmax(0, 1fr) 80px;
}
.feedback-report-status-link {
    color: inherit;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.feedback-report-status-link:hover {
    border-color: #9eb6df;
    box-shadow: 0 10px 22px rgba(15,23,42,.1);
    transform: translateY(-1px);
}
.feedback-report-row.head {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.feedback-report-row b,
.feedback-report-list b {
    text-align: right;
}
.feedback-ops-card {
    padding: 18px;
    margin-top: 18px;
}
.feedback-ops-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.feedback-ops-head h3 {
    margin: 0 0 6px;
}
.feedback-ops-list {
    display: grid;
    gap: 10px;
}
.feedback-ops-item {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 140px 140px 170px;
    gap: 12px;
    align-items: center;
    border: 1px solid #dbe4f0;
    border-left-width: 4px;
    border-radius: 14px;
    background: #fff;
    color: #0f172a;
    padding: 12px 14px;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.feedback-ops-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15,23,42,.1);
}
.feedback-ops-item.sentiment-negative {
    border-left-color: #ef4444;
}
.feedback-ops-item.sentiment-neutral {
    border-left-color: #f59e0b;
}
.feedback-ops-item.sentiment-positive {
    border-left-color: #22c55e;
}
.feedback-ops-time {
    color: #52637f;
    font-size: 13px;
    font-weight: 900;
}
.feedback-ops-item small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.feedback-ops-item em {
    color: #52637f;
    font-size: 13px;
    font-style: normal;
    font-weight: 800;
    text-align: right;
}
.feedback-ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
    gap: 18px;
    margin-top: 18px;
}
.feedback-report-store-link {
    color: #0f172a;
    text-decoration: none;
}
.feedback-report-store-link:hover {
    border-color: #9eb6df;
    box-shadow: 0 10px 22px rgba(15,23,42,.08);
}
.feedback-ops-sentiment {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.feedback-ops-sentiment span {
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 900;
}
.feedback-card-editor label:nth-child(n+4) {
    grid-column: span 1;
}
.feedback-card-editor input,
.feedback-card-editor select,
.feedback-card-editor textarea,
.feedback-add-question-form input,
.feedback-add-question-form select,
.feedback-add-question-form textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    font: inherit;
}
.feedback-card-editor textarea,
.feedback-add-question-form textarea {
    resize: vertical;
    min-height: 76px;
}
.feedback-question-actions {
    justify-content: flex-start;
}
.feedback-question-actions .checkbox-pill {
    padding: 8px 11px;
}
.feedback-help-card {
    margin-top: 14px;
}
.feedback-help-card h3 {
    margin: 0 0 12px;
}
.feedback-question-edit {
    display: grid;
    grid-template-columns: 44px 1fr 110px 170px 170px;
    gap: 12px;
    align-items: end;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}
.feedback-question-edit.is-disabled {
    opacity: .62;
}
.feedback-question-index {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
}
.feedback-question-toggles,
.feedback-question-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.qr-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 260px;
    gap: 16px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e8eef6;
}
.qr-code-preview {
    width: 92px;
    height: 92px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
}
.qr-row code {
    display: block;
    margin-top: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    color: #0f172a;
    overflow-wrap: anywhere;
}
.qr-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.copy-link-btn {
    font-weight: 900;
}
.feedback-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 18px 0;
}
.feedback-analytics-kpi {
    min-height: 130px;
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(15,23,42,.07);
}
.feedback-analytics-kpi span {
    display: block;
    color: #52637f;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}
.feedback-analytics-kpi b {
    display: block;
    margin-top: 12px;
    color: #0f1f44;
    font-size: 38px;
    line-height: 1;
    font-weight: 950;
}
.feedback-analytics-kpi small {
    display: block;
    margin-top: 12px;
    color: #64748b;
}
.nps-breakdown-bar {
    display: flex;
    height: 8px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}
.nps-breakdown-bar i {
    min-width: 0;
}
.nps-breakdown-bar .is-promoter {
    background: #22c55e;
}
.nps-breakdown-bar .is-passive {
    background: #f59e0b;
}
.nps-breakdown-bar .is-detractor {
    background: #ef4444;
}
.feedback-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.feedback-analytics-card {
    padding: 18px;
}
.feedback-analytics-card h3 {
    margin: 0 0 14px;
}
.analytics-bar-row {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}
.analytics-bar-row div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}
.analytics-bar-row span {
    color: #64748b;
    font-size: 13px;
}
.analytics-bar-row i {
    display: block;
    height: 8px;
    min-width: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #2563eb);
}
.feedback-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.analytics-pro-page {
    --analytics-green: #16a34a;
    --analytics-blue: #2563eb;
    --analytics-red: #e11d48;
    --analytics-amber: #f59e0b;
}
.analytics-filter-bar {
    display: grid;
    grid-template-columns: minmax(320px, auto) 190px 190px minmax(180px, .6fr) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px;
    margin: 20px 0;
}
.analytics-select-pill {
    display: grid;
    gap: 5px;
    border: 1px solid #d2ddec;
    border-radius: 12px;
    background: #fff;
    padding: 8px 12px;
    min-height: 54px;
}
.analytics-select-pill span {
    color: #52637f;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.analytics-select-pill select {
    border: 0;
    min-width: 0;
    color: #0f1f44;
    font: inherit;
    font-weight: 800;
    outline: none;
}
.analytics-executive-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.analytics-kpi-card,
.analytics-insight,
.analytics-panel {
    border: 1px solid #dbe4f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15,23,42,.07);
}
.analytics-kpi-card {
    min-height: 150px;
    padding: 18px;
}
.analytics-kpi-card span {
    display: block;
    color: #52637f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.analytics-kpi-card b {
    display: block;
    margin-top: 10px;
    color: #0f1f44;
    font-size: 38px;
    line-height: 1;
    font-weight: 950;
}
.analytics-kpi-card small,
.analytics-kpi-card em {
    display: block;
    margin-top: 10px;
    color: #64748b;
    font-style: normal;
}
.analytics-kpi-card em {
    font-size: 12px;
    font-weight: 900;
}
.analytics-kpi-card.is-index b,
.analytics-kpi-card.is-nps b {
    color: var(--analytics-blue);
}
.analytics-kpi-card.is-negative b {
    color: var(--analytics-red);
}
.analytics-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.analytics-insight {
    padding: 16px 18px;
    border-left: 4px solid #94a3b8;
}
.analytics-insight.is-positive {
    border-left-color: var(--analytics-green);
}
.analytics-insight.is-negative {
    border-left-color: var(--analytics-red);
}
.analytics-insight span {
    display: block;
    color: #52637f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.analytics-insight b {
    display: block;
    margin-top: 7px;
    font-size: 15px;
    line-height: 1.35;
}
.analytics-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
    gap: 18px;
    margin-bottom: 18px;
}
.analytics-panel {
    padding: 18px;
}
.analytics-panel h3 {
    margin: 0 0 12px;
}
.analytics-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}
.analytics-trend-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 10px;
    align-items: end;
    min-height: 240px;
    margin-top: 16px;
}
.analytics-trend-day {
    display: grid;
    gap: 8px;
    align-items: end;
    text-align: center;
}
.trend-bars {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 5px;
    height: 150px;
    border-bottom: 1px solid #e2e8f0;
}
.trend-bars i {
    display: block;
    width: 16px;
    min-height: 3px;
    border-radius: 999px 999px 0 0;
}
.trend-bars .volume,
.analytics-legend .volume {
    background: linear-gradient(180deg, #38bdf8, #2563eb);
}
.trend-bars .problem,
.analytics-legend .problem {
    background: linear-gradient(180deg, #fb7185, #e11d48);
}
.analytics-trend-day span {
    font-size: 12px;
    font-weight: 900;
}
.analytics-trend-day small {
    color: #64748b;
    font-size: 11px;
}
.analytics-legend,
.analytics-nps-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.analytics-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #52637f;
    font-size: 12px;
    font-weight: 900;
}
.analytics-legend i {
    width: 18px;
    height: 8px;
    border-radius: 999px;
}
.analytics-nps-big b {
    display: block;
    color: #0f1f44;
    font-size: 64px;
    line-height: 1;
    font-weight: 950;
}
.analytics-nps-big span {
    color: #64748b;
    font-weight: 800;
}
.analytics-nps-breakdown span {
    border-radius: 999px;
    padding: 8px 11px;
    font-weight: 900;
}
.analytics-table {
    display: grid;
    gap: 8px;
}
.analytics-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px 72px 86px 72px;
    gap: 10px;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    color: #0f172a;
    text-decoration: none;
}
.analytics-table-row.head {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}
.analytics-table-row:hover:not(.head) {
    border-color: #9eb6df;
    box-shadow: 0 10px 22px rgba(15,23,42,.08);
}
.analytics-table-row small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}
.analytics-table-row b {
    text-align: right;
}
.analytics-question-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.analytics-question-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fbff;
    padding: 14px;
}
.analytics-question-card > div:first-child span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}
.analytics-question-card > div:first-child b {
    display: block;
    margin-top: 5px;
    line-height: 1.35;
}
.analytics-question-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}
.analytics-question-metrics span {
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}
.analytics-question-metrics b {
    display: block;
    color: #0f1f44;
    font-size: 18px;
}
.feedback-store-panel {
    padding: 18px;
}
.feedback-store-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.feedback-store-head h3 {
    margin: 0 0 6px 0;
}
.feedback-store-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.feedback-store-stats div {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    padding: 14px;
}
.feedback-store-stats span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}
.feedback-store-stats b {
    font-size: 26px;
    color: #0f172a;
}
.feedback-store-list {
    display: grid;
    gap: 8px;
}
.feedback-store-review {
    display: grid;
    grid-template-columns: 170px 130px 1fr;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    text-decoration: none;
    color: #0f172a;
}
.feedback-store-review.sentiment-positive {
    border-left: 4px solid #22c55e;
}
.feedback-store-review.sentiment-neutral {
    border-left: 4px solid #f59e0b;
}
.feedback-store-review.sentiment-negative {
    border-left: 4px solid #ef4444;
}

@media (max-width: 1100px) {
    .feedback-list-header,
    .feedback-row summary {
        grid-template-columns: 130px 1.4fr 1fr 130px 130px;
    }
    .feedback-answer-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .feedback-question-edit {
        grid-template-columns: 44px 1fr 110px;
    }
    .feedback-filter-panel {
        grid-template-columns: repeat(4, 72px) minmax(72px, 1fr);
    }
    .feedback-filter-panel .filter-search-control input {
        min-width: 260px;
    }
    .feedback-card-editor {
        grid-template-columns: 1fr 1fr;
    }
    .feedback-question-settings,
    .rating-type-grid {
        grid-template-columns: 1fr 1fr;
    }
    .feedback-clean-option {
        grid-template-columns: 44px 1fr;
    }
    .feedback-rating-editor {
        grid-template-columns: 1fr 1fr;
    }
    .feedback-report-grid,
    .feedback-report-filter,
    .feedback-analytics-grid,
    .analytics-filter-bar,
    .analytics-executive-grid,
    .analytics-insight-grid,
    .analytics-main-grid,
    .feedback-ops-grid,
    .feedback-range-toolbar {
        grid-template-columns: 1fr;
    }
    .analytics-executive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .analytics-question-grid {
        grid-template-columns: 1fr;
    }
    .feedback-ops-item {
        grid-template-columns: 120px minmax(0, 1fr) 120px;
    }
    .feedback-ops-item em {
        grid-column: 2 / -1;
        text-align: left;
    }
    .feedback-report-stats,
    .feedback-analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .feedback-page .dashboard-page-head,
    .feedback-builder-head {
        flex-direction: column;
    }
    .feedback-head-actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }
    .feedback-filter-panel {
        grid-template-columns: repeat(3, 72px);
        justify-content: start;
    }
    .feedback-filter-panel .filter-search-control {
        grid-column: 1 / -1;
    }
    .feedback-filter-panel .filter-search-control input {
        min-width: min(100%, 320px);
    }
    .feedback-list-header {
        display: none;
    }
    .feedback-row summary,
    .feedback-status-form,
    .feedback-survey-title-form,
    .feedback-question-form,
    .feedback-question-edit,
    .qr-row,
    .qr-list-header,
    .feedback-store-review,
    .feedback-report-stats,
    .feedback-analytics-kpis,
    .feedback-report-toolbar,
    .feedback-range-toolbar,
    .analytics-filter-bar,
    .analytics-executive-grid,
    .analytics-insight-grid,
    .analytics-main-grid,
    .analytics-question-grid,
    .feedback-analytics-grid,
    .feedback-ops-grid,
    .feedback-ops-item {
        grid-template-columns: 1fr;
    }
    .analytics-table-row {
        grid-template-columns: 1fr 64px;
    }
    .analytics-table-row b:nth-child(n+4),
    .analytics-table-row.head b:nth-child(n+4) {
        display: none;
    }
    .analytics-question-metrics {
        grid-template-columns: 1fr;
    }
    .feedback-ops-head {
        flex-direction: column;
    }
    .feedback-ops-item em {
        grid-column: auto;
    }
    .feedback-period-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .report-date-pill {
        min-height: 58px;
    }
    .qr-row-actions {
        justify-content: flex-start;
    }
    .feedback-answer-grid,
    .feedback-store-stats {
        grid-template-columns: 1fr;
    }
    .feedback-card-editor {
        grid-template-columns: 1fr;
    }
    .feedback-question-settings,
    .feedback-option-row,
    .rating-type-grid,
    .feedback-type-card-bottom,
    .feedback-clean-option,
    .feedback-rating-editor {
        grid-template-columns: 1fr;
    }
}
.feedback-message-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.message-editor-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #d8e1ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 36, 70, 0.06);
}

.message-editor-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    content: "";
    background: #2864dc;
}

.message-editor-store::before {
    background: #159a61;
}

.message-editor-help::before {
    background: #e8a10b;
}

.message-editor-finish::before {
    background: #7a4bd4;
}

.message-editor-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.message-editor-head p {
    margin: 4px 0 0;
}

.message-editor-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 8px;
    background: #eaf1ff;
    color: #174eb6;
    font-size: 12px;
    font-weight: 800;
}

.message-editor-store .message-editor-icon {
    background: #e7f8ef;
    color: #087947;
}

.message-editor-help .message-editor-icon {
    background: #fff5d9;
    color: #9a6300;
}

.message-editor-finish .message-editor-icon {
    background: #f1ebff;
    color: #6130b7;
}

.feedback-message-grid textarea {
    display: block;
    width: 100%;
    min-height: 176px;
    padding: 14px 16px;
    resize: vertical;
    border: 1px solid #cbd7e8;
    border-radius: 8px;
    outline: none;
    background: #fbfdff;
    color: #0c1d3b;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.feedback-message-grid textarea:hover {
    border-color: #9fb7d9;
    background: #fff;
}

.feedback-message-grid textarea:focus {
    border-color: #2864dc;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(40, 100, 220, 0.12);
}

.system-message-preview {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #b9d3ff;
    border-left: 4px solid #2864dc;
    border-radius: 8px;
    background: #f5f9ff;
}

.system-message-preview span {
    color: #60718e;
    font-size: 13px;
}

.feedback-message-actions {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .feedback-message-grid {
        grid-template-columns: 1fr;
    }
}
