:root {
    --ink: #000000;
    --muted: #000000;
    --line: #dfe8e8;
    --surface: #ffffff;
    --canvas: #f3f7f6;
    --green: #13795b;
    --green-dark: #0b6048;
    --green-soft: #e5f5ef;
    --blue: #1976a3;
    --blue-soft: #e8f4f8;
    --red: #c43f49;
    --red-soft: #fdecee;
    --amber: #b56d0b;
    --amber-soft: #fff4dd;
    --shadow: 0 18px 48px rgba(28, 63, 67, .10);
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--canvas); font-size: 14px; }
button, input, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, label.button:focus-within {
    outline: 3px solid rgba(25, 118, 163, .28);
    outline-offset: 2px;
}
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.03em; }
h2 { margin-bottom: 7px; font-size: 24px; letter-spacing: -.03em; }
h3 { margin-bottom: 7px; font-size: 18px; }
p { color: var(--muted); line-height: 1.6; }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
    position: sticky; top: 0; height: 100vh; z-index: 20;
    display: flex; flex-direction: column; padding: 26px 18px 20px;
    color: #e9f7f2;
    background:
        radial-gradient(circle at 15% 3%, rgba(68, 191, 153, .22), transparent 34%),
        linear-gradient(170deg, #123d3a 0%, #0d2e35 72%, #112d3c 100%);
}
.brand, .login-brand { display: flex; align-items: center; gap: 12px; }
.brand { padding: 0 10px 27px; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-mark {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    flex: 0 0 auto; font-weight: 800; letter-spacing: -.05em; color: white;
    background: linear-gradient(135deg, #28ae7a, #1884a4); box-shadow: 0 9px 24px rgba(16, 178, 133, .25);
}
.brand div, .login-brand div, .user-chip div, .person div, .document-name div, .sidebar-footer div {
    min-width: 0; display: flex; flex-direction: column;
}
.brand strong { font-size: 15px; }
.brand span:not(.brand-mark) { color: #9bc2bd; font-size: 11px; margin-top: 2px; }
.sidebar nav { display: flex; flex-direction: column; gap: 5px; padding-top: 24px; }
.nav-item {
    border: 0; border-radius: 11px; padding: 12px 13px; cursor: pointer;
    display: flex; align-items: center; gap: 12px; text-align: left; color: #b8d3d0;
    background: transparent; transition: .18s ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: white; font-weight: 700; background: linear-gradient(90deg, rgba(44, 181, 137, .30), rgba(41, 143, 169, .15)); }
.nav-icon { width: 22px; text-align: center; font-size: 17px; }
.sidebar-footer {
    margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 14px 12px;
    border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: rgba(255,255,255,.04);
}
.sidebar-footer strong { font-size: 11px; }
.sidebar-footer span:not(.status-dot) { margin-top: 2px; color: #8eb7b3; font-size: 10px; }
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #45d69d; box-shadow: 0 0 0 5px rgba(69,214,157,.11); }
.workspace { min-width: 0; }
.topbar {
    height: 88px; padding: 0 38px; display: flex; align-items: center; gap: 15px;
    background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 15; backdrop-filter: blur(14px);
}
.topbar-title { min-width: 0; }
.eyebrow { display: block; margin-bottom: 5px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.topbar-actions form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; padding-right: 14px; border-right: 1px solid var(--line); }
.user-chip strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.user-chip span:not(.avatar) { color: var(--muted); font-size: 10px; }
.avatar {
    width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
    flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--green-dark); background: var(--green-soft);
}
.icon-button {
    width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
    display: grid; place-items: center; background: white; cursor: pointer;
}
.icon-button:hover { background: var(--canvas); }
.menu-button { display: none; }
.content { max-width: 1440px; margin: 0 auto; padding: 34px 38px 70px; }
.section-heading { margin-bottom: 23px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.section-heading p { margin: 0; }
.heading-actions, .card-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.button {
    min-height: 40px; border: 1px solid transparent; border-radius: 10px; padding: 9px 15px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-weight: 700; text-decoration: none; cursor: pointer; transition: .17s ease;
}
.button:disabled, .button.disabled { opacity: .55; cursor: not-allowed; }
.button.primary { color: white; background: linear-gradient(135deg, var(--green), #168b79); box-shadow: 0 8px 18px rgba(19,121,91,.16); }
.button.primary:hover:not(:disabled) { transform: translateY(-1px); background: linear-gradient(135deg, var(--green-dark), var(--green)); }
.button.secondary { border-color: var(--line); background: white; }
.button.secondary:hover { background: var(--canvas); }
.button.wide { width: 100%; }
.metric-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.metric-card, .editor-card, .published-card, .table-card, .state-card {
    border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 18px rgba(35,68,70,.035);
}
.metric-card { padding: 19px 21px; }
.metric-card > span { color: var(--muted); font-weight: 600; }
.metric-card strong { display: block; margin-top: 5px; font-size: 30px; letter-spacing: -.05em; }
.metric-card small { color: var(--muted); }
.table-card { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 18px; text-align: left; color: var(--muted); background: #f8faf9; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td { padding: 15px 18px; border-top: 1px solid #edf2f1; vertical-align: middle; }
tbody tr:hover { background: #fbfdfc; }
.person, .document-name { display: flex; align-items: center; gap: 11px; min-width: 190px; }
.person strong, .document-name strong { font-size: 12px; }
.person div span, .document-name div span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.file-icon {
    width: 38px; height: 42px; border-radius: 8px; display: grid; place-items: center;
    color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 800;
}
.badge { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge.positive { color: #0b6b4c; background: var(--green-soft); }
.badge.neutral { color: var(--ink); background: #eef2f2; }
.badge.warning { color: var(--amber); background: var(--amber-soft); }
.badge.danger { color: var(--red); background: var(--red-soft); }
.row-actions { white-space: nowrap; text-align: right; }
.text-button { border: 0; padding: 5px 7px; color: var(--blue); background: transparent; font-size: 11px; font-weight: 700; cursor: pointer; }
.text-button.danger { color: var(--red); }
.text-button:disabled { opacity: .45; cursor: not-allowed; }
.row-error { display: block; max-width: 210px; margin-top: 5px; color: var(--red); }
.configuration-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .65fr); gap: 20px; align-items: start; }
.configuration-number-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.editor-card, .published-card { padding: 23px; }
.card-header { margin-bottom: 19px; display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--ink); font-weight: 700; }
.field input, .field textarea, .login-form input {
    width: 100%; border: 1px solid #cfdcda; border-radius: 10px; padding: 11px 12px;
    color: var(--ink); background: white; font-weight: 500;
}
.field input:focus, .field textarea:focus, .login-form input:focus { border-color: var(--blue); outline: 3px solid rgba(25,118,163,.10); }
.field select { width: 100%; border: 1px solid #cfdcda; border-radius: 10px; padding: 11px 32px 11px 12px; color: var(--ink); background: white; font-weight: 500; }
.field select:focus { border-color: var(--blue); outline: 3px solid rgba(25,118,163,.10); }
.audit-filters { margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 14px; background: var(--surface); }
.audit-filter-actions { display: flex; align-items: end; gap: 8px; }
.correlation { display: block; margin-top: 4px; color: var(--muted); white-space: nowrap; }
.code-editor { min-height: 380px; resize: vertical; line-height: 1.55; font: 12px/1.55 "Cascadia Code", Consolas, monospace; background: #f9fbfa !important; }
.card-actions { margin-top: 16px; justify-content: space-between; }
.general-settings-card { max-width: 860px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
.general-settings-list { display: grid; gap: 0; }
.telephony-settings-fields { display: grid; gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
.general-setting-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.general-setting-row h4 { margin: 0 0 6px; font-size: 15px; }
.general-setting-row p { max-width: 610px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.switch-control { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.switch-control input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.switch-control span { display: block; width: 46px; height: 26px; border-radius: 999px; background: #b9c9c6; transition: background-color .15s ease; }
.switch-control span::after { display: block; width: 20px; height: 20px; margin: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(19, 57, 52, .3); content: ""; transition: transform .15s ease; }
.switch-control input:checked + span { background: var(--green); }
.switch-control input:checked + span::after { transform: translateX(20px); }
.switch-control input:focus-visible + span { outline: 3px solid rgba(25, 118, 163, .24); outline-offset: 3px; }
.switch-control input:disabled + span { cursor: wait; opacity: .6; }
.hint { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; }
.published-card { position: sticky; top: 112px; background: linear-gradient(160deg, #f9fdfb, #eef7f6); }
.published-card .revision-number { margin: 17px 0 12px; font-size: 42px; font-weight: 800; letter-spacing: -.06em; color: var(--green); }
.published-card hr { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.published-card h4 { margin-bottom: 7px; }
.upload-button { position: relative; overflow: hidden; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.knowledge-tabs { margin-bottom: 20px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.knowledge-tab {
    margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; padding: 11px 16px;
    color: var(--muted); background: transparent; font-weight: 700; cursor: pointer;
}
.knowledge-tab:hover { color: var(--ink); }
.knowledge-tab.active { color: var(--green); border-bottom-color: var(--green); }
.knowledge-tab span { margin-left: 5px; border-radius: 999px; padding: 2px 7px; color: var(--muted); background: #eaf0ef; font-size: 10px; }
.knowledge-upload-card { max-width: 800px; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 18px rgba(35,68,70,.035); }
.knowledge-dropzone {
    position: relative; min-height: 215px; border: 2px dashed #b9d2cd; border-radius: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: var(--ink); background: #f8fcfa; text-align: center; cursor: pointer; overflow: hidden;
}
.knowledge-dropzone:hover, .knowledge-dropzone:focus-within { border-color: var(--green); background: #f1faf6; }
.knowledge-dropzone.disabled { opacity: .58; cursor: wait; }
.knowledge-dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.knowledge-dropzone small { color: var(--muted); }
.dropzone-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: var(--green); background: var(--green-soft); font-size: 24px; font-weight: 700; }
.selected-knowledge-file { margin-top: 15px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; gap: 12px; background: #fbfdfc; }
.selected-knowledge-file > div { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.selected-knowledge-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-knowledge-file div span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.knowledge-upload-card .alert { margin: 15px 0 0; }
.knowledge-upload-actions { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.state-card { min-height: 190px; padding: 35px; display: flex; align-items: center; justify-content: center; gap: 15px; text-align: left; }
.state-card p { margin: 4px 0 0; }
.state-card.error-state { border-color: #f1ccd0; background: #fffafa; }
.state-icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--green); background: var(--green-soft); font-size: 19px; font-weight: 800; }
.error-state .state-icon { color: var(--red); background: var(--red-soft); }
.spinner { width: 23px; height: 23px; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
    position: fixed; z-index: 60; right: 25px; top: 103px; max-width: 420px;
    padding: 13px 14px; border: 1px solid #b8e0d1; border-radius: 12px;
    display: flex; gap: 18px; align-items: center; color: #0b6449; background: #edf9f4; box-shadow: var(--shadow);
}
.toast.error { color: var(--red); border-color: #efc5c9; background: #fff4f5; }
.toast button { margin-left: auto; border: 0; background: transparent; cursor: pointer; }
.drawer-backdrop, .sidebar-backdrop { position: fixed; inset: 0; z-index: 40; border: 0; background: rgba(10,29,34,.46); backdrop-filter: blur(2px); }
.drawer {
    position: fixed; z-index: 50; inset: 0 0 0 auto; width: min(460px, 100%);
    display: flex; flex-direction: column; background: white; box-shadow: -22px 0 60px rgba(10,35,41,.19);
    animation: drawer-in .19s ease-out;
}
@keyframes drawer-in { from { transform: translateX(30px); opacity: .5; } }
.drawer-header { padding: 25px 25px 19px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-header h2 { margin: 0; }
.drawer-body { padding: 25px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
.drawer-footer { margin-top: auto; padding: 18px 25px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.selected-record { padding: 14px; border-radius: 11px; display: flex; flex-direction: column; gap: 4px; background: var(--canvas); }
.selected-record span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.auth-shell {
    min-height: 100vh; padding: 30px; display: grid; place-items: center;
    background:
        radial-gradient(circle at 18% 15%, rgba(40,174,122,.17), transparent 28%),
        radial-gradient(circle at 87% 75%, rgba(25,118,163,.16), transparent 27%),
        linear-gradient(145deg, #eef8f4, #f6f9f9);
}
.login-card { width: min(440px, 100%); padding: 34px; isolation: isolate; border: 1px solid rgba(206,224,221,.9); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.login-brand { margin-bottom: 32px; }
.login-brand strong { font-size: 15px; }
.login-brand div span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.login-copy h1 { margin-bottom: 9px; font-size: 30px; }
.login-copy p { margin-bottom: 23px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; }
.security-note { margin: 20px 0 0; font-size: 10px; text-align: center; }
.alert { margin-bottom: 18px; padding: 11px 12px; border-radius: 10px; font-size: 12px; }
.alert-error { color: var(--red); background: var(--red-soft); }
.alert-info { color: var(--blue); background: var(--blue-soft); }
.nowrap { white-space: nowrap; }
.prompts-page { display: grid; gap: 20px; }
.prompt-workspace { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.prompt-list { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.prompt-list-meta { padding: 15px 17px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.prompt-category-heading { margin: 0; padding: 13px 17px; border-bottom: 1px solid var(--line); background: var(--green-soft); color: var(--muted); font-size: 12px; font-weight: 800; }
.prompt-category-settings > span:first-child { font-size: 12px; color: var(--green); }
.telephony-retry-settings { margin-top: 20px; }
.prompt-list-item { width: 100%; padding: 15px 17px; border: 0; border-bottom: 1px solid #edf2f1; display: grid; gap: 5px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.prompt-list-item:hover, .prompt-list-item.active { background: #f1faf6; }
.prompt-list-item.active { box-shadow: inset 4px 0 var(--green); }
.prompt-list-item > span:first-child { font-weight: 800; }
.prompt-list-item small, .prompt-origin { color: var(--muted); }
.prompt-list-badges { margin-top: 4px; }
.prompt-editor { min-width: 0; }
.prompt-editor code, .prompt-list code { overflow-wrap: anywhere; color: var(--blue); font-size: 11px; }
.prompt-revisions { display: grid; gap: 5px; color: var(--muted); font-size: 11px; text-align: right; }
.prompt-textarea { min-height: 470px; }
.prompt-origin { margin-top: 12px; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.prompt-actions, .prompt-actions > div { display: flex; gap: 9px; flex-wrap: wrap; }
.prompt-state { padding: 24px; display: grid; justify-items: start; gap: 10px; }
.countries-page { display: grid; gap: 20px; }
.countries-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.country-archive-filter { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.countries-table td > span, .countries-table td > small { display: block; }
.countries-table tr.archived { opacity: .72; }
.country-drawer { width: min(920px, 96vw); }
.country-confirmation { width: min(480px, 96vw); }
.country-editor { display: grid; gap: 18px; }
.country-basics { display: grid; grid-template-columns: minmax(260px, 1.2fr) minmax(220px, 1fr); gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg, #fff 0%, #f8fcfa 100%); }
.country-basics .field { align-content: start; }
.country-basics .field small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.country-name-field { grid-column: 1 / -1; }
.country-editor-section { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 8px 24px rgba(20, 55, 45, .035); }
.country-editor-section .card-header { align-items: flex-start; margin-bottom: 14px; }
.country-editor-section .card-header p { max-width: 560px; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.country-editor-section .field small { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.country-prompt-textarea { min-height: 150px; resize: vertical; }
.country-editor input[data-searchable-options="true"] { padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.country-editor input[data-searchable-options="true"]::-webkit-calendar-picker-indicator { opacity: 0; }
.country-picker-field input:disabled { color: var(--ink); background-color: #f4f7f6; opacity: 1; }
.country-language-list { display: grid; gap: 9px; }
.country-language-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto 36px; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfc; }
.country-language-row label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.country-week-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.country-day-card, .country-exception-card { padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.country-day-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.country-slot-row { display: grid; grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr) 34px; align-items: center; gap: 7px; margin-bottom: 7px; }
.country-slot-row input { min-width: 0; }
.country-slot-row.invalid input { border-color: var(--red); background: var(--red-soft); }
.country-editor-error { margin: 0 25px 12px; }
.country-exception-card { display: grid; gap: 9px; margin-top: 10px; }
.country-exception-fields { display: grid; grid-template-columns: 145px minmax(180px, .8fr) minmax(180px, 1fr) 36px; align-items: center; gap: 8px; }
.country-actions { flex-wrap: wrap; }
.correlation { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1100px) {
    .admin-shell { grid-template-columns: 222px minmax(0, 1fr); }
    .sidebar { padding-inline: 12px; }
    .brand { padding-inline: 7px; }
    .content, .topbar { padding-left: 24px; padding-right: 24px; }
    .configuration-grid { grid-template-columns: 1fr; }
    .prompt-workspace { grid-template-columns: 1fr; }
    .country-basics, .country-week-grid { grid-template-columns: 1fr; }
    .country-name-field { grid-column: auto; }
    .country-exception-fields { grid-template-columns: 1fr; }
    .general-setting-row { align-items: flex-start; }
    .published-card { position: static; }
    .user-chip div { display: none; }
    .audit-filters { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 760px) {
    .admin-shell { display: block; }
    .sidebar { position: fixed; left: 0; width: min(290px, 88vw); transform: translateX(-105%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop { z-index: 19; }
    .menu-button { display: grid; }
    .topbar { height: 76px; padding: 0 16px; }
    .topbar .eyebrow { display: none; }
    .topbar h1 { max-width: 43vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 19px; }
    .content { padding: 24px 16px 55px; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .heading-actions { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
    .metric-grid { grid-template-columns: 1fr; }
    .configuration-number-grid { grid-template-columns: 1fr; }
    .metric-card { display: grid; grid-template-columns: 1fr auto; }
    .metric-card strong { grid-row: span 2; grid-column: 2; }
    .card-actions { align-items: stretch; flex-direction: column; }
    .card-actions .button { width: 100%; }
    .prompt-actions > div { width: 100%; }
    .knowledge-upload-card { padding: 18px; }
    .knowledge-upload-actions { align-items: stretch; flex-direction: column; }
    .knowledge-upload-actions .button { width: 100%; }
    .table-card { margin-inline: -16px; border-left: 0; border-right: 0; border-radius: 0; }
    .audit-filters { padding: 14px; grid-template-columns: 1fr; }
    .audit-filter-actions { align-items: stretch; flex-direction: column; }
    .audit-filter-actions .button { width: 100%; }
    th, td { padding-inline: 14px; }
    .toast { left: 14px; right: 14px; top: 86px; }
    .country-language-row { grid-template-columns: minmax(0, 1fr) auto 36px; }
    .country-actions .button { flex: 1 1 180px; }
}

@media (max-width: 430px) {
    .auth-shell { padding: 15px; }
    .login-card { padding: 25px 21px; border-radius: 18px; }
    .login-copy h1 { font-size: 26px; }
    .user-chip { display: none; }
    .section-heading .button, .upload-button { width: 100%; }
    .editor-card, .published-card { padding: 18px; }
    .drawer-header, .drawer-body { padding-inline: 19px; }
}
