:root { --blue: #0b55bb; --blue-deep: #082e66; --orange: #f47b20; --ink: #10213e; --muted: #60718e; --line: #d6e0ef; --paper: #f4f7fb; --white: #fff; --danger: #ba2d2d; --success: #0d6c4a; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--paper); }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.loading, .login { min-height: 100vh; display: grid; place-content: center; gap: 16px; text-align: center; }
.loading__mark { width: 54px; height: 54px; margin: auto; display: grid; place-items: center; color: var(--white); background: var(--blue); border-radius: 8px; font-size: 26px; font-weight: 800; }
.login__panel { width: min(420px, calc(100vw - 38px)); padding: 34px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 35px rgba(12, 47, 97, .10); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--blue-deep); font-weight: 800; }
.brand__mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--white); background: var(--blue); border-radius: 6px; }
h1, h2, h3, p { margin-top: 0; }
.login h1 { margin: 25px 0 8px; font-size: 27px; }
.login p { color: var(--muted); line-height: 1.5; }
.login label, .editor label { display: grid; gap: 7px; margin: 17px 0; color: var(--blue-deep); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 10px; color: var(--ink); background: var(--white); border: 1px solid #bfcde1; border-radius: 4px; outline-color: var(--blue); }
textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.button { min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 4px; font-weight: 700; }
.button--primary { color: var(--white); background: var(--blue); }
.button--primary:hover { background: #06469c; }
.button--secondary { color: var(--blue-deep); background: var(--white); border-color: #bfcde1; }
.button--danger { color: var(--danger); background: #fff7f7; border-color: #ebbbbb; }
.button:disabled { cursor: not-allowed; opacity: .65; }
.form-message { min-height: 20px; margin: 14px 0 0; color: var(--danger); font-size: 13px; font-weight: 700; }
.app-shell { min-height: 100vh; }
.topbar { min-height: 70px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 22px; color: var(--white); background: var(--blue-deep); }
.topbar .brand { color: var(--white); }
.topbar .brand__mark { color: var(--blue); background: var(--white); }
.topbar__right { display: flex; align-items: center; gap: 15px; font-size: 13px; }
.layout { display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.sidebar { padding: 22px 14px; background: var(--white); border-right: 1px solid var(--line); }
.sidebar button { width: 100%; min-height: 43px; padding: 9px 13px; display: flex; align-items: center; gap: 9px; color: var(--blue-deep); text-align: left; background: transparent; border: 0; border-radius: 4px; font-weight: 700; }
.sidebar button:hover, .sidebar button.is-active { color: var(--white); background: var(--blue); }
.sidebar__note { margin: 30px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.workspace { width: min(1480px, 100%); padding: 34px; }
.section-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.section-header h1 { margin-bottom: 7px; font-size: 28px; letter-spacing: 0; }
.section-header p { max-width: 700px; margin-bottom: 0; color: var(--muted); line-height: 1.45; }
.toolbar { padding: 14px; display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.toolbar input { max-width: 420px; }
.toolbar select { width: 190px; }
.toolbar .spacer { flex: 1; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 6px; }
.catalog-table-wrap { overflow: auto; }
.catalog-table { width: 100%; min-width: 950px; border-collapse: collapse; font-size: 13px; }
.catalog-table th { padding: 12px; color: var(--muted); text-align: left; background: #f8faff; border-bottom: 1px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.catalog-table td { padding: 11px 12px; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
.catalog-table tr:last-child td { border-bottom: 0; }
.catalog-table tr:hover td { background: #f7fbff; }
.catalog-table .name { min-width: 280px; color: var(--blue-deep); font-weight: 700; }
.small { color: var(--muted); font-size: 12px; }
.tag { display: inline-block; padding: 4px 7px; color: var(--blue-deep); background: #e8f0ff; border-radius: 3px; font-size: 11px; font-weight: 700; }
.tag--orange { color: #8a3e00; background: #fff0df; }
.table-action { padding: 6px 8px; color: var(--blue); background: transparent; border: 1px solid #adc4e8; border-radius: 3px; font-size: 12px; font-weight: 700; }
.save-bar { position: sticky; bottom: 16px; margin-top: 16px; padding: 13px 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--blue-deep); background: var(--white); border: 1px solid #afc9ed; border-radius: 6px; box-shadow: 0 7px 22px rgba(12, 47, 97, .10); }
.save-bar__status { color: var(--muted); font-size: 13px; }
.save-bar__status.is-success { color: var(--success); font-weight: 700; }
.save-bar__status.is-error { color: var(--danger); font-weight: 700; }
.editor-layout { display: grid; grid-template-columns: minmax(240px, .78fr) minmax(0, 1.22fr); gap: 18px; }
.instruction-list { max-height: 650px; overflow: auto; }
.instruction-list button { width: 100%; padding: 13px 15px; display: block; color: var(--ink); text-align: left; background: var(--white); border: 0; border-bottom: 1px solid #edf1f7; }
.instruction-list button.is-active { background: #edf4ff; box-shadow: inset 3px 0 0 var(--blue); }
.instruction-list strong { display: block; margin-bottom: 4px; color: var(--blue-deep); }
.instruction-list span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.editor { padding: 24px; }
.editor h2 { margin-bottom: 6px; font-size: 21px; }
.editor p { color: var(--muted); }
.editor__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.checkbox-label { display: flex !important; align-items: center; gap: 9px !important; }
.checkbox-label input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--blue); }
.editor__actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 20px; }
.message-panel { max-width: 790px; padding: 26px; }
.message-panel h2 { margin-bottom: 8px; }
.message-panel > p { color: var(--muted); line-height: 1.5; }
.message-status { margin: 20px 0; padding: 13px; color: var(--blue-deep); background: #eef5ff; border-left: 3px solid var(--blue); line-height: 1.45; }
.message-status strong { display: block; margin-bottom: 4px; }
.modal { position: fixed; inset: 0; z-index: 20; padding: 22px; display: grid; place-items: center; background: rgba(4, 23, 54, .45); }
.modal__dialog { width: min(820px, 100%); max-height: min(90vh, 900px); overflow: auto; padding: 25px; background: var(--white); border-radius: 8px; box-shadow: 0 20px 50px rgba(4, 23, 54, .25); }
.modal__header { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.modal__header h2 { margin: 0; font-size: 22px; }
.modal__close { width: 34px; height: 34px; color: var(--blue-deep); background: var(--white); border: 1px solid var(--line); border-radius: 4px; font-size: 21px; }
.empty { padding: 35px; color: var(--muted); text-align: center; }
.hidden { display: none !important; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { padding: 18px; }
.metric span, .metric small { display: block; color: var(--muted); font-size: 13px; }
.metric strong { display: block; margin: 8px 0; color: var(--ink); font-size: 32px; line-height: 1; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 18px; margin-bottom: 18px; }
.dashboard-panel { padding: 20px; margin-bottom: 18px; }
.dashboard-panel h2 { margin: 0 0 15px; font-size: 18px; }
.funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.funnel > div { min-height: 110px; padding: 13px; background: #f8faff; border-top: 3px solid var(--blue); }
.funnel span, .funnel small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
.funnel strong { display: block; margin: 8px 0; font-size: 26px; }
.daily-list { display: grid; gap: 5px; padding: 0; margin: 0; list-style: none; }
.daily-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
@media (max-width: 980px) { .dashboard-metrics, .funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .dashboard-metrics, .funnel { grid-template-columns: 1fr; } .dashboard-panel { padding: 15px; } }
@media (max-width: 820px) { .topbar { min-height: 64px; padding: 0 18px; }.topbar__right span { display: none; }.layout { grid-template-columns: 1fr; }.sidebar { padding: 10px; display: flex; gap: 5px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }.sidebar button { width: auto; flex: 0 0 auto; }.sidebar__note { display: none; }.workspace { padding: 24px 17px; }.section-header, .toolbar, .save-bar { align-items: stretch; flex-direction: column; }.toolbar input, .toolbar select { max-width: none; width: 100%; }.toolbar .spacer { display: none; }.editor-layout { grid-template-columns: 1fr; }.instruction-list { max-height: 240px; }.editor__grid { grid-template-columns: 1fr; }.save-bar .button { width: 100%; } }
