/* ==========================================================================
   Шрифты (Plus Jakarta Sans для UI + JetBrains Mono для команд/кода).
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */
:root {
    /* Surfaces */
    --bg:              #f6f7f9;
    --bg-soft:         #fafbfc;
    --surface:         #ffffff;
    --surface-soft:    #f7f8fa;
    --header-bg:       #1c1f24;
    --header-bg-2:     #16181c;

    /* Text */
    --text:            #1c2026;
    --text-2:          #4a5260;
    --text-muted:      #8b95a3;
    --text-faint:      #b6bdc7;

    /* Borders */
    --border:          #e6e9ee;
    --border-soft:     #eef0f4;
    --border-strong:   #d7dce3;

    /* Brand / accents */
    --primary:         #2563eb;
    --primary-600:     #1d4ed8;
    --primary-50:      #eff5ff;

    --success:         #16a34a;
    --success-600:     #15803d;
    --success-50:      #e8f7ee;
    --success-100:     #d1f0dd;

    --purple:          #7c3aed;
    --purple-600:      #6d28d9;
    --purple-50:       #f1ecfe;
    --purple-100:      #e7defc;

    --amber:           #f59e0b;
    --amber-50:        #fff7e6;

    --teal:            #0891b2;
    --teal-50:         #ecfeff;

    --gray-btn:        #5b6471;
    --gray-btn-hover:  #4a525e;

    /* Effects */
    --shadow-xs:  0 1px 1px rgba(16,18,22,.04);
    --shadow-sm:  0 1px 2px rgba(16,18,22,.05), 0 0 0 1px rgba(16,18,22,.04);
    --shadow-md:  0 4px 14px -4px rgba(16,18,22,.08), 0 0 0 1px rgba(16,18,22,.04);
    --shadow-lg:  0 12px 32px -8px rgba(16,18,22,.10), 0 0 0 1px rgba(16,18,22,.04);

    --radius-sm: 8px;
    --radius:    10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --font-ui:   'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ==========================================================================
   BASE
   ========================================================================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: var(--font-ui);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-600); }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
code, .mono { font-family: var(--font-mono); }
.font-monospace { font-family: var(--font-mono); }

/* ==========================================================================
   APP NAVBAR
   ========================================================================== */
.app-navbar {
    background: linear-gradient(to bottom, var(--header-bg), var(--header-bg-2));
    color: #e8eaef;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.app-navbar__inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; gap: 32px;
    padding: 14px 24px;
}
.app-navbar__brand {
    color: #fff; font-weight: 700; font-size: 17px;
    letter-spacing: -0.02em;
    display: inline-flex; align-items: center; gap: 8px;
}
.app-navbar__brand:hover { color: #fff; opacity: .9; }
.app-navbar__brand-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 14px rgba(124,58,237,.55);
}
.app-navbar__menu {
    display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
}
.app-navbar__menu a,
.app-navbar__menu button.logout {
    color: #b6bdc7; font-weight: 500; font-size: 13.5px;
    padding: 6px 12px; border-radius: 7px;
    display: inline-block; transition: all .12s ease;
    background: transparent; border: 0; font-family: inherit;
}
.app-navbar__menu a:hover,
.app-navbar__menu button.logout:hover { color: #fff; background: rgba(255,255,255,.05); }
.app-navbar__menu a.is-active { color: #fff; background: rgba(255,255,255,.08); }
.app-navbar__menu .logout { color: #8b95a3; cursor: pointer; }
.app-navbar__menu .logout small { color: #5d6571; font-size: 11.5px; font-weight: 500; }
.app-navbar__menu form { display: inline-block; margin: 0; }
.app-navbar__spacer { flex: 1; }

/* ==========================================================================
   MAIN LAYOUT
   ========================================================================== */
.app-main {
    max-width: 1280px; margin: 0 auto;
    padding: 24px;
    min-height: calc(100vh - 130px);
}

/* breadcrumbs */
.crumbs {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted);
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.crumbs a {
    color: var(--text-2);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all .12s ease;
    text-decoration: none;
}
.crumbs a:hover {
    color: var(--primary);
    background: var(--primary-50);
}
.crumbs .sep {
    color: var(--text-faint);
    font-size: 11px;
}
.crumbs .current {
    color: var(--text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    background: var(--primary-50);
    border: 1px solid #d8e4ff;
    border-radius: 6px;
    font-size: 12.5px;
    letter-spacing: -0.005em;
}
.crumbs .current::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .14);
    flex-shrink: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    font-family: var(--font-ui); font-weight: 600; font-size: 13.5px;
    border-radius: 8px; padding: 8px 16px;
    transition: all .12s ease;
    letter-spacing: -0.005em;
    border: 1px solid transparent;
    display: inline-flex; align-items: center; gap: 7px;
    line-height: 1.3;
}
.btn:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.btn-sm { font-size: 12px; padding: 4px 10px; border-radius: 6px; gap: 5px; }
.btn-lg { font-size: 15px; padding: 11px 20px; border-radius: 10px; }
.btn-success {
    background: var(--success); color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 1px 2px rgba(22,163,74,.18);
}
.btn-success:hover { background: var(--success-600); color: #fff; }
.btn-primary {
    background: var(--primary); color: #fff; border-color: var(--primary);
    box-shadow: 0 1px 0 rgba(255,255,255,.12) inset;
}
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
.btn-secondary {
    background: var(--gray-btn); color: #fff; border-color: var(--gray-btn);
}
.btn-secondary:hover { background: var(--gray-btn-hover); color: #fff; }
.btn-outline-primary {
    background: var(--surface); color: var(--primary);
    border-color: #cfdcf3;
}
.btn-outline-primary:hover { background: var(--primary-50); color: var(--primary-600); border-color: var(--primary); }
.btn-light {
    background: #fff; color: var(--text-2); border-color: var(--border);
}
.btn-light:hover { background: #f7f8fa; color: var(--text); border-color: var(--border-strong); }
.btn-danger {
    background: var(--bs-danger, #dc3545); color: #fff; border-color: var(--bs-danger, #dc3545);
}
.btn-danger:hover { background: #b02838; border-color: #b02838; color: #fff; }
.btn-icon {
    width: 34px; height: 34px; padding: 0; justify-content: center;
}

/* ==========================================================================
   CARDS / PANELS
   ========================================================================== */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}
.panel__head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface-soft);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.panel__head h2 {
    font-size: 14.5px; font-weight: 700; margin: 0; color: var(--text);
    letter-spacing: -0.01em;
}
.panel__head .panel__sub { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.panel__body { padding: 20px; }

/* ==========================================================================
   FORM FIELDS (Material/Floating-label)
   ========================================================================== */
.field {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .12s ease;
}
.field:hover { border-color: var(--border-strong); }
.field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.field > label {
    position: absolute;
    top: 8px; left: 14px;
    font-size: 11.5px; font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    pointer-events: none;
}
.field > .field__control {
    width: 100%;
    border: 0; background: transparent; outline: none;
    padding: 26px 14px 8px;
    font: inherit; color: var(--text); font-size: 14px;
    border-radius: var(--radius);
}
.field > select.field__control {
    appearance: none; -webkit-appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238b95a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}
textarea.field__control { resize: vertical; min-height: 64px; }
.field--textarea-lg .field__control { min-height: 110px; }
.field__icon-prefix {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--primary); font-size: 16px;
}
.field--with-icon .field__control { padding-left: 40px; }
.field--with-icon > label { left: 40px; }

.form-help {
    color: var(--text-muted); font-size: 12.5px;
    margin-top: 6px;
}

/* Switch (Bootstrap 5 enhanced) */
.switch {
    position: relative;
    display: inline-flex; align-items: center; gap: 10px;
    cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__track {
    width: 38px; height: 22px; border-radius: 999px;
    background: #d7dce3;
    position: relative;
    transition: background .18s ease;
}
.switch__track::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .18s ease;
}
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch__label { color: var(--text-2); font-size: 13.5px; font-weight: 500; }
.switch.switch--sm .switch__track { width: 30px; height: 18px; }
.switch.switch--sm .switch__track::after { width: 14px; height: 14px; }
.switch.switch--sm input:checked + .switch__track::after { transform: translateX(12px); }

/* ==========================================================================
   BADGES / PILLS
   ========================================================================== */
.pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600;
    letter-spacing: 0;
    line-height: 1.5;
}
.pill-success { background: var(--success-100); color: var(--success-600); }
.pill-purple  { background: var(--purple-100); color: var(--purple-600); }
.pill-purple-soft { background: var(--purple-50); color: var(--purple-600); }
.pill-gray    { background: #eef0f4; color: var(--text-2); }
.pill-amber   { background: var(--amber-50); color: #b45309; }
.pill-teal    { background: #cffafe; color: #0e7490; }
.pill-cmd {
    font-family: var(--font-mono); font-weight: 600;
    background: var(--purple-50); color: var(--purple-600);
    padding: 4px 10px; border-radius: 7px; font-size: 12.5px;
}

.count-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 20px; padding: 0 6px;
    border-radius: 999px;
    background: #eef0f4; color: var(--text-2);
    font-size: 11.5px; font-weight: 700;
    margin-left: 6px;
}

/* ==========================================================================
   PROJECTS GRID + PROJECT CARD
   ========================================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 920px) {
    .projects-grid { grid-template-columns: 1fr; }
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.project-card__head {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
}
.project-card__icon {
    width: 44px; height: 44px; flex: 0 0 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
    box-shadow: 0 4px 12px -2px rgba(124,58,237,.35), inset 0 1px 0 rgba(255,255,255,.18);
}
.project-card__title {
    flex: 1; min-width: 0;
}
.project-card__title h3 {
    font-size: 17px; font-weight: 700; margin: 0;
    letter-spacing: -0.015em;
    display: inline-flex; align-items: center; gap: 8px;
}
.project-card__url {
    color: var(--text-muted); font-size: 13px; margin-top: 2px;
}
.project-card__actions {
    display: flex; align-items: center; gap: 8px;
}
.project-card__on-label {
    color: var(--text-muted); font-size: 12.5px; font-weight: 500;
}
.icon-btn {
    width: 30px; height: 30px; border-radius: 7px;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; color: var(--text-muted); cursor: pointer;
    transition: all .12s ease;
}
.icon-btn:hover { background: #f1f3f6; color: var(--text); }

.project-card__sections {
    border-top: 1px solid var(--border-soft);
}
.section-row {
    display: block;
}
.section-row__head {
    width: 100%;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    background: transparent; border: 0;
    border-top: 1px solid var(--border-soft);
    cursor: pointer; text-align: left;
    color: var(--text-2); font-weight: 500; font-size: 13.5px;
    font-family: inherit;
    transition: background .12s ease;
}
.section-row:first-child .section-row__head { border-top: 0; }
.section-row__head:hover { background: var(--surface-soft); }
.section-row__icon {
    width: 28px; height: 28px; border-radius: 8px;
    background: #f1f3f6; color: var(--text-2);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.section-row__title {
    flex: 1; display: inline-flex; align-items: center;
}
.section-row__chev {
    color: var(--text-faint); font-size: 14px;
    transition: transform .18s ease;
}
.section-row.is-open .section-row__chev { transform: rotate(180deg); color: var(--text-2); }
.section-row__body {
    padding: 4px 18px 14px 58px;
    display: none;
}
.section-row.is-open .section-row__body { display: block; }
.cmd-list { display: flex; flex-direction: column; gap: 8px; }
.cmd-item {
    background: var(--purple-50);
    border: 1px solid #eee2ff;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cmd-item__name {
    font-family: var(--font-mono); font-weight: 600; font-size: 13px;
    color: var(--purple-600);
}
.cmd-item__desc {
    font-size: 12.5px; color: var(--text-muted);
    margin-top: 2px;
}
.cmd-item__main { min-width: 0; }

/* ==========================================================================
   LANGUAGE SWITCHER
   ========================================================================== */
.lang-switch {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-xs);
}
.lang-switch__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-bottom: 10px;
}
.lang-switch__title {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 600; font-size: 13.5px; color: var(--text);
}
.lang-switch__title .bi { color: var(--primary); }
.lang-switch__hint { color: var(--text-muted); font-size: 12.5px; }
.lang-switch__hint .bi { color: var(--text-faint); margin-right: 4px; }
.lang-switch__hint b { color: var(--text); font-weight: 600; }
.lang-switch__tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    background: #eef0f4; padding: 4px; border-radius: 10px;
}
.lang-switch__tab {
    background: transparent; border: 0;
    padding: 9px 14px;
    font: inherit; font-size: 13.5px; font-weight: 600;
    color: var(--text-2);
    border-radius: 7px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    transition: all .15s ease;
}
.lang-switch__tab:hover { color: var(--text); }
.lang-switch__tab.is-active {
    background: var(--primary); color: #fff;
    box-shadow: 0 1px 2px rgba(37,99,235,.25);
}

.seg-switch {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    background: #eef0f4;
    padding: 4px;
    border-radius: 10px;
}
.seg-switch__btn {
    background: transparent; border: 0;
    padding: 6px 12px;
    font: inherit; font-size: 13px; font-weight: 600;
    color: var(--text-2);
    border-radius: 7px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: all .15s ease;
    white-space: nowrap;
}
.seg-switch__btn:hover { color: var(--text); }
.seg-switch__btn.is-active {
    background: var(--primary); color: #fff;
    box-shadow: 0 1px 2px rgba(37,99,235,.25);
}
.seg-switch--xs { padding: 3px; gap: 3px; border-radius: 8px; }
.seg-switch--xs .seg-switch__btn { padding: 4px 9px; font-size: 11.5px; border-radius: 6px; }

/* ==========================================================================
   NAV TABS (Bootstrap-like, refined)
   ========================================================================== */
.ntabs {
    display: flex; gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    padding: 0 8px;
}
.ntab {
    background: transparent; border: 0;
    padding: 12px 16px;
    font: inherit; font-size: 13.5px; font-weight: 500;
    color: var(--text-2); cursor: pointer;
    position: relative;
    border-radius: 8px 8px 0 0;
    transition: color .12s ease, background .12s ease;
}
.ntab:hover { color: var(--text); background: var(--surface-soft); }
.ntab.is-active {
    color: var(--text); font-weight: 600;
    background: var(--surface);
}
.ntab.is-active::after {
    content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px;
    height: 2px; background: var(--primary);
    border-radius: 2px 2px 0 0;
}

/* ==========================================================================
   TABLE (questionnaires-like)
   ========================================================================== */
.qtable {
    width: 100%;
    border-collapse: separate; border-spacing: 0;
    font-size: 13.5px;
}
.qtable thead th {
    text-align: left;
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--border);
}
.qtable tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
.qtable tbody tr:hover td { background: #fafbfc; }
.qtable tbody tr:last-child td { border-bottom: 0; }
.qtable .col-tight  { width: 1%; white-space: nowrap; text-align: right; }
.qtable .col-nowrap { white-space: nowrap; }
.qtable .col-time   { white-space: nowrap; color: var(--text-muted); font-size: 12.5px; }

.q-name { display: flex; align-items: center; gap: 12px; }
.q-name__icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 6px -1px rgba(245,158,11,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.q-name__title {
    font-weight: 600; color: var(--text); font-size: 14px;
    line-height: 1.3;
}
.q-name__sub {
    color: var(--text-muted); font-size: 12px; margin-top: 2px;
}
.q-stat {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--text-2); font-weight: 500;
    margin-right: 14px;
}
.q-stat .bi { color: var(--text-faint); font-size: 13px; }
.q-stat:last-child { margin-right: 0; }

/* ==========================================================================
   PAGINATION / LIST FOOTER
   ========================================================================== */
.list-footer {
    padding: 12px 18px;
    color: var(--text-muted); font-size: 12.5px;
    border-top: 1px solid var(--border-soft);
}
.list-footer b { color: var(--text-2); font-weight: 600; }

/* ==========================================================================
   VISUAL EDITOR (questionnaire builder)
   ========================================================================== */
.veditor-toolbar {
    padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    border-top: 1px solid var(--border-soft);
}
.veditor-toolbar__left { display: flex; gap: 8px; flex-wrap: wrap; }
.veditor-toolbar__right { display: flex; gap: 4px; }
.veditor-canvas {
    border-top: 1px solid var(--border-soft);
    background:
        radial-gradient(circle at 1px 1px, #e1e5ec 1px, transparent 1px) 0 0 / 18px 18px;
    background-color: var(--surface-soft);
    min-height: 260px;
    padding: 24px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 13px;
}
.veditor-canvas .hint {
    background: #fff;
    border: 1px dashed var(--border-strong);
    padding: 10px 14px; border-radius: 8px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 18px 24px;
    color: var(--text-muted); font-size: 12.5px;
}
.app-footer__inner {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.app-footer a { color: var(--primary); }

/* ==========================================================================
   PAGES (fade animation)
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 720px) {
    .app-navbar__inner { gap: 12px; padding: 12px 16px; }
    .app-navbar__menu { gap: 0; flex-wrap: wrap; }
    .app-navbar__menu a { padding: 6px 8px; font-size: 13px; }
    .app-main { padding: 16px; }
    .panel__body { padding: 16px; }
    .qtable thead { display: none; }
    .qtable tbody td { display: block; padding: 6px 14px; border: 0; }
    .qtable tbody tr { display: block; border-bottom: 1px solid var(--border-soft); padding: 10px 0; }
}

/* ==========================================================================
   YII GRIDVIEW + ОБЩИЕ УТИЛИТЫ
   ========================================================================== */

/* Сортировочные иконки в GridView-ссылках */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0; height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}
a.asc:after  { border-bottom: solid 7px var(--text); border-top-width: 0; }
a.desc:after { border-top:    solid 7px var(--text); border-bottom-width: 0; }

.grid-view th { white-space: nowrap; }

.not-set { color: #c55; font-style: italic; }
.hint-block { display: block; margin-top: 5px; color: var(--text-muted); }

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

.form-group { margin-bottom: 1rem; }

.dropdown-menu.dropdown-menu-sm .dropdown-item { font-size: .875rem; }

.fsp-80 { font-size: 80%; }

/* Project list helpers (используются в views/project/index.php) */
.project-index ol.list-group .projectID {
    padding: 2px 4px 3px 6px !important;
    border-bottom-right-radius: var(--bs-border-radius);
    border-top-left-radius: var(--bs-border-radius);
    margin-left: -16px;
}
.project-index ol.list-group .listProjectControls { padding-top: 2px; }

/* Toast уведомления (AlertToast widget) */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); display: none; }
}
.toast-container { overflow: hidden; }
.isNotify.toast.show { animation: slideInRight 0.3s ease-out; }
.isNotify.slide-out-right { opacity: 1; animation: slideOutRight 0.5s forwards; }
.toast.isNotify.hide { display: block; opacity: 1; }

@media (max-width: 976px) {
    .field-type-selector { grid-template-columns: repeat(2, 1fr); }
    .field-body          { grid-template-columns: 1fr; }
}
