@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

/* ============================================================
   VS TRAVEL CRM — ДИЗАЙН-СИСТЕМА
   Цвета из логотипа (светлая версия):
   #2d52c4 — основной синий (светлее)
   #4a78e0 — дополнительный синий
   #1a2a4f — тёмный для текста
   ============================================================ */
:root {
    /* Бренд — светлый синий */
    --brand-dark:    #2d52c4;
    --brand-mid:     #4a78e0;
    --brand-light:   #6b9eff;
    --brand-grad:    linear-gradient(135deg, #2d52c4 0%, #4a78e0 60%, #6b9eff 100%);
    --brand-grad-h:  linear-gradient(135deg, #1e3d9e 0%, #2d52c4 60%, #4a78e0 100%);

    /* Основной — синий */
    --primary:       #2d52c4;
    --primary-dark:  #1e3d9e;
    --primary-mid:   #4a78e0;
    --primary-light: #eef2ff;
    --primary-50:    rgba(45,82,196,.08);
    --primary-ring:  rgba(45,82,196,.25);

    /* Акцент — оранжевый (без изменений) */
    --accent:        #ff6b35;
    --accent-dark:   #e55a22;
    --accent-light:  #fff4ef;
    --accent-ring:   rgba(255,107,53,.2);

    /* Семантические */
    --green:         #16a34a;
    --green-light:   #f0fdf4;
    --red:           #dc2626;
    --red-light:     #fef2f2;
    --orange:        #d97706;
    --orange-light:  #fffbeb;
    --blue:          #2563eb;
    --blue-light:    #eff6ff;
    --purple:        #7c3aed;
    --purple-light:  #faf5ff;
    --teal:          #0d9488;
    --teal-light:    #f0fdfa;

    /* Текст (оставляем тёмным для контраста) */
    --text:          #1a2a4f;
    --text-muted:    #5a6a8a;
    --text-light:    #9aa5bc;
    --text-white:    #ffffff;

    /* Фон */
    --bg:            #f0f4f9;
    --bg-card:       #ffffff;
    --bg-hover:      #f7f9fc;
    --bg-active:     #eef2ff;

    /* Границы */
    --border:        #e2e8f0;
    --border-dark:   #c8d3e0;
    --border-focus:  var(--brand-mid);

    /* Тени */
    --shadow-xs:  0 1px 2px rgba(26,42,79,.04);
    --shadow-sm:  0 1px 3px rgba(26,42,79,.06), 0 1px 2px rgba(26,42,79,.04);
    --shadow:     0 2px 4px rgba(26,42,79,.06), 0 1px 2px rgba(26,42,79,.04);
    --shadow-md:  0 4px 8px rgba(26,42,79,.08), 0 2px 4px rgba(26,42,79,.04);
    --shadow-lg:  0 10px 20px rgba(26,42,79,.1), 0 4px 8px rgba(26,42,79,.04);
    --shadow-xl:  0 20px 40px rgba(26,42,79,.12), 0 8px 16px rgba(26,42,79,.06);
    --shadow-brand: 0 4px 14px rgba(45,82,196,.3);
    --shadow-accent: 0 4px 14px rgba(255,107,53,.3);

    /* Радиусы */
    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius:     10px;
    --radius-lg:  14px;
    --radius-xl:  20px;
    --radius-2xl: 28px;

    --nav-h: 104px;
}

/* ============================================================
   СБРОС И БАЗОВЫЕ СТИЛИ
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   ТОП-НАВИГАЦИЯ (без изменений, только цвета)
   ============================================================ */
.topnav {
    position: sticky;
    top: 0;
    z-index: 500;
    height: var(--nav-h);
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 var(--border), var(--shadow-sm);
}

.topnav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 20px;
}

/* ---- ЛОГОТИП ---- */
.topnav-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 12px;
}
.logo-img { height: 46px; width: auto; }
.logo-text { display: flex; flex-direction: column; margin-left: 4px; }
.logo-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; line-height: 1.2; }
.logo-sub  { font-size: 9.5px; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 1px; }

/* ---- NAV LINKS ---- */
.topnav-nav {
    display: flex;
    align-items: center;
    gap: 1px;
    flex: 1;
    overflow: visible;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    height: 36px;
    text-decoration: none;
}
.nav-link:hover { color: var(--primary); background: var(--primary-50); }
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}
.nav-dropdown { position: relative; }
.nav-drop-btn { cursor: pointer; }
.drop-icon { width: 10px; height: 10px; color: currentColor; transition: transform .2s; flex-shrink: 0; }
.nav-dropdown.open .drop-icon { transform: rotate(180deg); }
.nav-dropdown.open > .nav-drop-btn,
.nav-dropdown.open > .nav-link { color: var(--primary); background: var(--primary-light); }

/* ---- ДРОПДАУНЫ (цвета уже из переменных) ---- */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(.97);
    transform-origin: top left;
    transition: all 0.18s cubic-bezier(.4,0,.2,1);
    z-index: 600;
    min-width: 240px;
    overflow: hidden;
}
.dropdown-panel--right { left: auto; right: 0; transform-origin: top right; }
.nav-dropdown.open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Сетка в дропдауне */
.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    gap: 2px;
}
.drop-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
    text-decoration: none;
    transition: background 0.12s;
}
.drop-item:hover { background: var(--bg-hover); color: var(--text); }
.drop-icon-wrap {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.drop-title { font-size: 13px; font-weight: 600; color: var(--text); }
.drop-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Список */
.dropdown-list { padding: 6px; }
.drop-item-sm {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: background .12s;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
}
.drop-item-sm:hover { background: var(--bg-hover); color: var(--text); }
.drop-item-featured { color: var(--primary); font-weight: 600; }
.drop-item-featured:hover { background: var(--primary-light); }
.drop-item-danger:hover { background: var(--red-light); color: var(--red); }

.dropdown-divider { height: 1px; background: var(--border); margin: 4px 6px; }
.dropdown-header {
    padding: 12px 16px 8px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.dropdown-footer {
    display: flex; justify-content: space-between;
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.dropdown-footer a { font-size: 12px; color: var(--primary); font-weight: 500; }
.dropdown-footer a:hover { text-decoration: underline; }

/* ---- УВЕДОМЛЕНИЯ ---- */
.notif-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .12s;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item:last-of-type { border-bottom: none; }
.notif-icon { font-size: 19px; width: 30px; text-align: center; flex-shrink: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-sub   { font-size: 12px; color: var(--text-muted); }
.notif-red  { border-left: 3px solid var(--red); }
.notif-blue { border-left: 3px solid var(--primary); }
.notif-orange { border-left: 3px solid var(--accent); }

/* ---- ПРАВАЯ ЧАСТЬ ---- */
.topnav-right { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }

.icon-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: none; border: none;
    position: relative;
    transition: all .15s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--primary-50); color: var(--primary); }

.notif-dot {
    position: absolute; top: 4px; right: 4px;
    min-width: 17px; height: 17px;
    background: var(--red); color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; padding: 0 3px;
}

/* Кнопка "Создать" — оранжевая (акцент) */
.btn-create {
    display: flex; align-items: center; gap: 6px;
    padding: 0 16px;
    height: 36px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 600;
    transition: all .15s;
    white-space: nowrap;
}
.btn-create svg { width: 14px; height: 14px; }
.btn-create:hover { background: var(--accent-dark); box-shadow: var(--shadow-accent); }
.btn-create:active { transform: scale(.98); }

/* Пользователь */
.user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    background: none; cursor: pointer;
    transition: all .15s;
    height: 40px;
}
.user-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.nav-dropdown.open .user-btn { border-color: var(--primary); background: var(--primary-light); }

.user-avatar-top {
    width: 30px; height: 30px;
    background: var(--brand-grad);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.user-info-top { line-height: 1.25; }
.user-name-top { font-size: 13px; font-weight: 600; color: var(--text); }
.user-role-top { font-size: 11px; color: var(--text-muted); }
.user-menu-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    background: var(--primary-light);
}

/* Разделитель после лого */
.nav-divider {
    width: 1px; height: 28px;
    background: var(--border);
    margin: 0 8px;
    flex-shrink: 0;
}

/* Мобильное меню */
.mobile-toggle {
    display: none;
    flex-direction: column; gap: 5px;
    width: 36px; height: 36px;
    border: none; background: none;
    padding: 9px; border-radius: var(--radius-sm);
    margin-left: auto; flex-shrink: 0;
}
.mobile-toggle span { display: block; height: 2px; background: var(--text-muted); border-radius: 2px; transition: all .25s; }
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(15,26,48,.5); z-index: 499; backdrop-filter: blur(3px); }

/* ============================================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================================ */
.main-content {
    padding: 28px 28px;
    min-height: calc(100vh - var(--nav-h));
}

/* ============================================================
   ЗАГОЛОВОК СТРАНИЦЫ
   ============================================================ */
.page-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    margin-bottom: 24px; gap: 16px;
}
.page-header h1 {
    font-size: 22px; font-weight: 700;
    color: var(--text); letter-spacing: -0.4px;
}
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

/* ============================================================
   КАРТОЧКИ
   ============================================================ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 18px;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 14px; font-weight: 600; color: var(--text); }
.card-body  { padding: 18px; }
.card-link  { font-size: 12px; color: var(--primary); font-weight: 500; white-space: nowrap; }
.card-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* ============================================================
   СТАТИСТИКА — компактные KPI-карточки: иконка слева, число и
   подпись справа в одну строку, вместо высоких "пустых" блоков с
   иконкой сверху. Там, где есть история по месяцам, внутри карточки
   рисуется мини-график (sparkline_svg() в functions.php).
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.kpi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 11px;
    text-decoration: none; color: inherit;
    min-height: 60px;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
    background: rgba(45,82,196,.12);
}
.kpi-body { min-width: 0; }
.kpi-value { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -.3px; line-height: 1.15; white-space: nowrap; }
.kpi-label { font-size: 10.5px; color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .2px; margin-top: 1px; }
.kpi-spark { position: absolute; right: 0; bottom: 0; width: 72px; height: 26px; opacity: .9; pointer-events: none; }

.kpi-card.kpi-primary { border-left-color: var(--primary); }
.kpi-card.kpi-accent  { border-left-color: var(--accent); }
.kpi-card.kpi-green   { border-left-color: var(--green); }
.kpi-card.kpi-red     { border-left-color: var(--red); }
.kpi-card.kpi-teal    { border-left-color: var(--teal); }
.kpi-card.kpi-purple  { border-left-color: var(--purple); }
.kpi-card.kpi-orange  { border-left-color: var(--orange); }

.kpi-card.kpi-accent .kpi-icon { background: rgba(255,107,53,.14); }
.kpi-card.kpi-green  .kpi-icon { background: rgba(22,163,74,.14); }
.kpi-card.kpi-red    .kpi-icon { background: rgba(220,38,38,.13); }
.kpi-card.kpi-teal   .kpi-icon { background: rgba(13,148,136,.14); }
.kpi-card.kpi-purple .kpi-icon { background: rgba(168,85,247,.14); }
.kpi-card.kpi-orange .kpi-icon { background: rgba(245,158,11,.15); }

/* .stat-card/.stats-grid — старый, более крупный формат статистических карточек.
   На дашборде (index.php) заменён компактными .kpi-card выше, но остаётся в
   использовании на других страницах (отчёты, туры, лиды и т.д.) — не трогать. */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px; margin-bottom: 20px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all .2s;
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: var(--brand-grad);
    border-radius: 3px 3px 0 0;
}
.stat-card.stat-accent::before { background: var(--accent); }
.stat-card.stat-green::before  { background: var(--green); }
.stat-card.stat-red::before    { background: var(--red); }
.stat-card.stat-teal::before   { background: var(--teal); }
.stat-card.stat-purple::before { background: var(--purple); }
.stat-card.stat-orange::before { background: var(--orange); }

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 38px; height: 38px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; margin-bottom: 12px;
    background: rgba(45,82,196,.13);
}
.stat-card.stat-accent .stat-icon { background: rgba(255,107,53,.14); }
.stat-card.stat-green  .stat-icon { background: rgba(22,163,74,.14); }
.stat-card.stat-red    .stat-icon { background: rgba(220,38,38,.13); }
.stat-card.stat-teal   .stat-icon { background: rgba(13,148,136,.14); }
.stat-card.stat-purple .stat-icon { background: rgba(168,85,247,.14); }
.stat-card.stat-orange .stat-icon { background: rgba(245,158,11,.15); }
.stat-value { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; margin-bottom: 3px; }
.stat-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.stat-delta { font-size: 11px; margin-top: 4px; font-weight: 600; }

/* Рейтинг менеджеров (дашборд) */
.leaderboard-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-rank {
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 800; color: var(--text-muted);
    background: var(--bg); flex-shrink: 0;
}
.leaderboard-rank.rank-1 { background: linear-gradient(135deg,#ffd700,#f59e0b); color: #fff; }
.leaderboard-rank.rank-2 { background: linear-gradient(135deg,#c0c0c0,#94a3b8); color: #fff; }
.leaderboard-rank.rank-3 { background: linear-gradient(135deg,#cd7f32,#92400e); color: #fff; }
.leaderboard-body { flex: 1; min-width: 0; }
.leaderboard-name {
    font-size: 13px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.leaderboard-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.leaderboard-fill  { height: 100%; background: var(--brand-grad); border-radius: 3px; }
.leaderboard-amount { font-size: 12px; font-weight: 700; color: var(--green); white-space: nowrap; }
.delta-up   { color: var(--green); }
.delta-dn   { color: var(--red); }

/* ============================================================
   ТАБЛИЦЫ
   ============================================================ */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 10px 15px;
    background: var(--bg);
    text-align: left;
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
tbody td {
    padding: 11px 15px;
    border-bottom: 1px solid var(--border);
    color: var(--text); font-size: 13.5px;
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-hover); }
/* .compact-table — плотный вариант для таблиц с большим числом колонок
   (visa_tracker.php, insurance.php, analytics.php) */
.compact-table thead th { padding: 8px 12px; font-size: 10.5px; }
.compact-table tbody td { padding: 8px 12px; font-size: 13px; }
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.small        { font-size: 12px; margin-top: 2px; }
.text-green   { color: var(--green);  font-weight: 600; }
.text-danger  { color: var(--red); }
.text-warning { color: var(--orange); }
.text-nowrap  { white-space: nowrap; }
.row-muted td { opacity: .5; }

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-size: 13px; font-weight: 600;
    cursor: pointer; border: none;
    transition: all .18s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    height: 38px;
}
.btn:active { transform: scale(.98); }

/* Primary — синий (градиент) */
.btn-primary {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 2px 6px rgba(45,82,196,.22);
}
.btn-primary:hover { background: var(--brand-grad-h); box-shadow: var(--shadow-brand); color: #fff; transform: translateY(-1px); }

/* Accent — оранжевый */
.btn-accent {
    background: var(--accent);
    color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); box-shadow: var(--shadow-accent); color: #fff; transform: translateY(-1px); }

/* Outline — нейтральная вторичная кнопка */
.btn-outline {
    background: #fff;
    color: var(--text);
    border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Ghost */
.btn-ghost {
    background: transparent; color: var(--text-muted);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* Danger */
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; box-shadow: 0 4px 12px rgba(220,38,38,.25); }

/* Success */
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #15803d; }

/* Sizes */
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: var(--radius-sm); height: 29px; }
.btn-lg { padding: 12px 26px; font-size: 15px; height: 44px; }

/* WhatsApp */
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1ebe5d; }

/* ============================================================
   ФОРМЫ
   ============================================================ */
.form-body { display: flex; flex-direction: column; gap: 6px; }
/* Поле = подпись слева + значение справа, в лёгкой рамке — единый вид для всех карточек
   редактирования (requests/clients/tourists/operators/tours/users/visa/insurance/yachts/tasks).
   Раньше .form-group было продублировано (это + ещё один блок ниже в этом же файле, плюс
   page-local копии в operators_edit.php/tours_edit.php) — три разных версии одного класса.
   display:grid, не flex — flex здесь ломался в Chrome (select/input как flex-элемент с
   flex:1;min-width:0 "взрывал" собственную высоту, проверено скриншотами). */
.form-group {
    display: grid;
    /* Ширина подписи — по содержимому, но не больше 148px (дальше перенос строк) — иначе
       короткие подписи ("Ночей", "Отель") оставляли пустую полосу до фиксированной границы
       колонки, а длинное значение из-за этого теряло место и обрезалось. */
    grid-template-columns: fit-content(148px) 1fr;
    align-items: center;
    gap: 4px 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfe;
    transition: border-color .12s, background .12s;
}
.form-group:last-child { margin-bottom: 0; }
.form-group:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-ring); }
.form-group label {
    font-size: 11.5px; font-weight: 600; color: var(--text-muted);
    text-transform: none; letter-spacing: normal; margin-bottom: 0;
}
.form-group input:not([type="checkbox"]):not([type="radio"]), .form-group select, .form-group textarea, .form-group .form-control {
    min-width: 0; width: 100%;
    border: none !important; background: transparent; padding: 0 !important; border-radius: 0;
    font-size: 13.5px; font-weight: 600; box-shadow: none;
}
.form-group select, .form-group input:not([type="checkbox"]):not([type="radio"]) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; box-shadow: none; }
/* Чекбокс/радио внутри .form-group — не растягивать на всю ширину поля, обычный размер. */
.form-group input[type="checkbox"], .form-group input[type="radio"] { width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--primary); }
/* Textarea/подсказка/предупреждение — не втискивать в ряд label/поле. */
.form-group:has(textarea) { grid-template-columns: 1fr; }
.form-group:has(textarea) label { margin-bottom: 2px; }
.form-group:has(textarea) textarea { min-height: 50px; }
/* .form-group, у которого единственное поле — чекбокс внутри своего label (не пара
   "подпись слева / значение справа") — не разбивать на 2 колонки. */
.form-group:has(> label > input[type="checkbox"]) { grid-template-columns: 1fr; }
.form-group.stack { grid-template-columns: 1fr; }
.form-group.stack label { margin-bottom: 4px; }
.form-group.stack textarea { min-height: 60px; }
.form-group > .text-danger, .form-group > .text-warning, .form-group > small { grid-column: 1 / -1; margin: 4px 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
/* Без min-width:0 грид-колонка не сжимается ниже "естественной" ширины .form-group
   (148px-подпись + отступы) — в узких карточках (модалка users.php ~380px) значение
   вылезало за пределы карточки. Тот же приём — для .fg-row ниже. */
.form-row > .form-group, .form-row.three > .form-group { min-width: 0; }
/* В узких карточках (модалки visa_tracker/insurance/yachts/users.php, ~380px) двум полям
   в ряд просто не хватает места на 148px-подпись + значение — переключаем такие поля на
   подпись сверху, как было раньше. В широких формах (operators_edit/tours_edit.php) колонка
   ряда намного шире 300px, там ничего не меняется. */
.form-row, .form-row.three { container-type: inline-size; }
@container (max-width: 400px) {
    .form-row > .form-group, .form-row.three > .form-group { grid-template-columns: 1fr; }
    .form-row > .form-group label, .form-row.three > .form-group label { margin-bottom: 2px; }
}
@media (max-width: 700px) { .form-row, .form-row.three { grid-template-columns: 1fr; } }
.form-section-title {
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
}
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=password],
input[type=url], input[type=search], select, textarea {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px; font-family: inherit;
    color: var(--text); background: #fff;
    transition: border-color .15s, box-shadow .15s;
    appearance: none; line-height: 1.5;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}
input[readonly] { background: var(--bg); color: var(--text-muted); cursor: default; }
textarea { resize: vertical; line-height: 1.6; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6a8a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 34px; cursor: pointer;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }

/* .fg/.fi — компактная форма для inline-редактирования: подпись слева, значение справа,
   в лёгкой рамке (requests_add/edit/view.php). Единственная копия — было продублировано
   по 3 page-local <style>, из-за чего страницы визуально разъезжались.
   display:grid, не flex — flex здесь ломался в Chrome (select/input как flex-элемент с
   flex:1;min-width:0 "взрывал" собственную высоту, проверено скриншотами, воспроизводилось
   стабильно вне зависимости от содержимого поля). */
.fg-row, .fg-row3 { gap: 6px; }
.fg-row > .fg, .fg-row3 > .fg { min-width: 0; }
.fg-row, .fg-row3 { container-type: inline-size; }
@container (max-width: 400px) {
    .fg-row > .fg, .fg-row3 > .fg { grid-template-columns: 1fr; }
    .fg-row > .fg label, .fg-row3 > .fg label { margin-bottom: 2px; }
}
.fg {
    display: grid;
    grid-template-columns: fit-content(148px) 1fr;
    align-items: center;
    gap: 4px 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fbfcfe;
    transition: border-color .12s, background .12s;
}
.fg:last-child { margin-bottom: 0; }
.fg:focus-within { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-ring); }
.fg label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: none; letter-spacing: normal; }
.fg-row3 .fg { grid-template-columns: fit-content(108px) 1fr; }
.fi {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid var(--border); border-radius: 8px;
    font-size: 13.5px; font-family: inherit; color: var(--text);
    background: #fff; transition: border-color .15s, box-shadow .15s;
    appearance: none;
}
.fi:focus { outline: none; border-color: var(--primary-mid); box-shadow: 0 0 0 3px var(--primary-ring); }
select.fi {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; cursor: pointer;
}
textarea.fi { resize: vertical; line-height: 1.6; }
.fg .fi {
    min-width: 0;
    border: none !important; background-color: transparent; padding: 0 !important;
    font-size: 13.5px; font-weight: 600; box-shadow: none;
}
/* Длинное однострочное значение (рейс, маршрут) обрезаем многоточием, а не голым обрезом
   текста впритык к стрелке селекта — для textarea это не нужно, там перенос строк. */
.fg select.fi, .fg input.fi { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fg .fi:focus { outline: none; box-shadow: none; }
.fg:has(textarea) { grid-template-columns: 1fr; }
.fg:has(textarea) label { margin-bottom: 2px; }
.fg:has(textarea) .fi { min-height: 20px; }
.fg select.fi { padding-right: 18px !important; }
/* Подсказки/предупреждения, которые печатаются сразу после инпута (курс ЦБ, "паспорт
   просрочен" и т.п.) — на свою строку, не втискивать в ряд label/поле. */
.fg > div[style*="font-size"], .fg > .text-danger, .fg > .text-warning, .fg > .passport-warn, .fg > small { grid-column: 1 / -1; margin: 4px 0 0; }
.fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fg-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .fg-row, .fg-row3 { grid-template-columns: 1fr; } }

/* Рейс с пересадкой — несколько отрезков одного направления (assets/js/flight-legs.js).
   Каждый отрезок на своей строке, "+ Добавить пересадку" добавляет ещё одну. */
.flight-legs { display: flex; flex-direction: column; gap: 6px; }
.flight-leg-row { display: flex; gap: 6px; align-items: center; }
.flight-leg-row .flight-leg-input { flex: 1; min-width: 0; }
.flight-leg-remove {
    flex-shrink: 0; width: 26px; height: 26px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
    cursor: pointer; font-size: 12px; line-height: 1; transition: all .15s;
}
.flight-leg-remove:hover { background: rgba(220,38,38,.08); color: var(--red); border-color: rgba(220,38,38,.3); }
.flight-leg-add { margin-top: 6px; }

/* Комбобокс выбора клиента (поиск вместо огромного <select> со всеми клиентами подряд) —
   см. assets/js/client-search.js. Используется на requests_add.php, requests_edit.php. */
.client-combo { position: relative; }
.client-combo-input { width: 100%; }
/* position:fixed + координаты из JS (не absolute) — поле часто лежит внутри карточки с
   overflow:hidden (скруглённые углы шапки), которая обрезала бы выпадающий список. */
.client-combo-list {
    position: fixed;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 10px 28px rgba(26,42,79,.16);
    max-height: 280px; overflow-y: auto; padding: 4px; z-index: 700;
}
.client-combo-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; display: flex; align-items: baseline; gap: 6px; }
.client-combo-item:hover, .client-combo-item.active { background: var(--primary-light); }
.client-combo-item .name { font-weight: 600; color: var(--text); }
.client-combo-item .phone { color: var(--text-muted); font-size: 11.5px; }
.client-combo-empty { padding: 8px 10px; color: var(--text-muted); font-size: 12.5px; }

/* ============================================================
   СТАТУС-БЕЙДЖИ
   ============================================================ */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 30px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; flex-shrink: 0; }
.status-new       { background: #dbeafe; color: #1e40af; }
.status-confirmed { background: #dcfce7; color: #166534; }
.status-advance   { background: #e0f2fe; color: #0369a1; }
.status-paid      { background: #fef3c7; color: #92400e; }
.status-voucher   { background: var(--primary-light); color: var(--primary); }
.status-ontour    { background: var(--teal-light); color: var(--teal); }
.status-feedback  { background: #fef3c7; color: #b45309; }
.status-completed { background: #f3f4f6; color: #374151; }
.status-cancelled { background: var(--red-light); color: var(--red); }
.status-unknown   { background: var(--red-light); color: var(--red); font-style: italic; }

.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge-blue   { background: var(--primary-light); color: var(--primary); }
.badge-green  { background: var(--green-light); color: var(--green); }
.badge-orange { background: var(--orange-light); color: var(--orange); }
.badge-red    { background: var(--red-light); color: var(--red); }
.badge-gray   { background: #f3f4f6; color: #374151; }
.badge-accent { background: var(--accent-light); color: var(--accent-dark); }

/* ============================================================
   ФИЛЬТРЫ / ПЕРЕКЛЮЧАТЕЛЬ ВИДА
   ============================================================ */
.filter-bar {
    display: flex; align-items: flex-end; flex-wrap: wrap;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 18px;
}
.filter-bar input, .filter-bar select { max-width: 220px; margin: 0; }
.filter-group { flex: 1; min-width: 180px; }
.filter-group label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.filter-group input, .filter-group select { width: 100%; max-width: none; margin: 0; }

.view-toggle { display: flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.btn-view { padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--text-muted); background: #fff; transition: all .15s; text-decoration: none; border: none; cursor: pointer; }
.btn-view:hover { background: var(--bg); color: var(--text); }
.btn-view.active { background: var(--brand-dark); color: #fff; }

/* ============================================================
   ТАБЫ
   ============================================================ */
.tabs-bar, .tab-bar-alt {
    display: flex; border-bottom: 2px solid var(--border);
    margin-bottom: 20px; gap: 0; overflow-x: auto;
}
.tab-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px;
    font-size: 13px; font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
    white-space: nowrap;
    background: none; border-top: none; border-left: none; border-right: none;
    cursor: pointer;
    text-decoration: none;
}
.tab-link:hover { color: var(--primary); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ============================================================
   ПРОГРЕСС-БАР
   ============================================================ */
.progress-bar-wrap { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: var(--brand-grad); border-radius: 99px; transition: width .5s; }

/* ============================================================
   ВЫЛЕТЫ
   ============================================================ */
.departure-list { display: flex; flex-direction: column; }
.departure-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px; border-bottom: 1px solid var(--border);
    text-decoration: none; color: inherit; transition: background .12s;
}
.departure-item:last-child { border-bottom: none; }
.departure-item:hover { background: var(--bg-hover); }
.departure-item.urgent { border-left: 3px solid var(--red); }
.departure-item.soon   { border-left: 3px solid var(--accent); }
.departure-date { text-align: center; min-width: 40px; }
.dep-day   { font-size: 19px; font-weight: 800; line-height: 1; color: var(--text); }
.dep-month { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.departure-info { flex: 1; }
.dep-client { font-size: 13px; font-weight: 600; color: var(--text); }
.dep-tour   { font-size: 12px; color: var(--text-muted); }
.dep-days   { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--bg); color: var(--text-muted); white-space: nowrap; }
.dep-days.urgent { background: var(--red-light); color: var(--red); }
.dep-days.soon   { background: var(--orange-light); color: var(--orange); }

/* ============================================================
   ЗАДАЧИ
   ============================================================ */
.task-list { display: flex; flex-direction: column; }
.task-item { padding: 11px 16px; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: none; }
.task-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.task-meta, .task-date { font-size: 12px; color: var(--text-muted); }
.task-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 14px; }
.task-card { background: #fff; border-radius: var(--radius-lg); padding: 15px; border: 1px solid var(--border); border-left: 4px solid var(--border); box-shadow: var(--shadow-xs); }
.task-card.priority-high   { border-left-color: var(--red); }
.task-card.priority-medium { border-left-color: var(--accent); }
.task-card.priority-low    { border-left-color: var(--green); }
.task-card-head  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.task-priority-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.task-priority-badge.priority-high   { background: var(--red-light); color: var(--red); }
.task-priority-badge.priority-medium { background: var(--accent-light); color: var(--accent-dark); }
.task-priority-badge.priority-low    { background: var(--green-light); color: var(--green); }
.task-actions { display: flex; gap: 6px; }
.task-card-title { font-size: 13.5px; font-weight: 600; margin-bottom: 5px; color: var(--text); }
.task-card-desc  { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.5; }
.task-card-meta  { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   РЕДАКТИРОВАНИЕ
   ============================================================ */
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.operators-layout { display: flex; gap: 16px; align-items: flex-start; }
.info-list { display: flex; flex-direction: column; }
.info-row  { display: flex; align-items: flex-start; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-label { min-width: 130px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; padding-top: 2px; flex-shrink: 0; }
.info-value { font-size: 13.5px; color: var(--text); flex: 1; word-break: break-word; }

.tourist-row { background: var(--bg); border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); margin-bottom: 10px; }
.tourist-row-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.tourist-num { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.tourists-list { display: flex; flex-direction: column; }
.tourist-view-item { padding: 11px 16px; border-bottom: 1px solid var(--border); }
.tourist-view-item:last-child { border-bottom: none; }
.tourist-view-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tourist-view-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.tourist-view-details { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-muted); }

.payments-list { display: flex; flex-direction: column; }
.payment-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.payment-item:last-child { border-bottom: none; }
.payment-total { background: var(--bg); font-size: 13px; }
.payment-date   { font-size: 13px; font-weight: 600; min-width: 80px; color: var(--text-muted); }
.payment-info   { flex: 1; }
.payment-type   { font-size: 13px; font-weight: 500; display: block; }
.payment-comment{ font-size: 12px; color: var(--text-muted); }
.payment-amount { font-size: 14px; font-weight: 700; color: var(--green); white-space: nowrap; }

.commission-display { background: var(--green-light); border: 1.5px solid #bbf7d0; border-radius: var(--radius); padding: 14px; text-align: center; }
.comm-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--green); opacity: .7; }
.comm-value { font-size: 26px; font-weight: 800; color: var(--green); letter-spacing: -1px; }
.comm-pct   { font-size: 14px; font-weight: 600; color: var(--green); opacity: .8; }
.price-info { font-size: 13px; color: var(--text-muted); padding: 10px; background: var(--bg); border-radius: var(--radius-sm); }

/* ============================================================
   УВЕДОМЛЕНИЯ
   ============================================================ */
.notif-list { display: flex; flex-direction: column; }
.notif-item-card { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; transition: background .12s; }
.notif-item-card:hover { background: var(--bg-hover); }
.notif-item-card.notif-pink   { border-left: 3px solid #ec4899; }
.notif-item-card.notif-orange { border-left: 3px solid var(--accent); }
.notif-item-card.notif-red    { border-left: 3px solid var(--red); }
.notif-item-card.notif-purple { border-left: 3px solid var(--purple); }
.notif-icon-wrap { font-size: 19px; width: 32px; text-align: center; flex-shrink: 0; }
.notif-body  { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-text  { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.notif-arrow { font-size: 14px; color: var(--text-light); }

/* ============================================================
   АЛЕРТЫ
   ============================================================ */
.alert { padding: 11px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.alert-success { background: var(--green-light);  color: #166534; border: 1px solid #bbf7d0; }
.alert-danger  { background: var(--red-light);    color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--orange-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: var(--primary-light); color: var(--primary); border: 1px solid #c7d2fe; }

/* ============================================================
   ПУСТОЕ СОСТОЯНИЕ
   ============================================================ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 14px; }

/* ============================================================
   ПАГИНАЦИЯ
   ============================================================ */
.pagination { display: flex; gap: 4px; padding: 14px 16px; justify-content: center; border-top: 1px solid var(--border); }
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; color: var(--text-muted);
    background: #fff; border: 1px solid var(--border); text-decoration: none; transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--brand-grad); color: #fff; border-color: transparent; }

/* ============================================================
   ЖУРНАЛ ДЕЙСТВИЙ
   ============================================================ */
.log-action-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.user-avatar-sm {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand-grad); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; flex-shrink: 0;
}

/* ============================================================
   ИМПОРТ
   ============================================================ */
.import-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.import-step { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; text-align: center; }
.import-step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; margin: 0 auto 10px; }
.import-step-title { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; color: var(--text); }
.import-step-text  { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   ПОИСК
   ============================================================ */
.search-hero {
    background: var(--brand-grad);
    border-radius: var(--radius-xl); padding: 28px 30px; margin-bottom: 20px; color: #fff;
}
.search-hero h2 { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.search-hero-input { display: flex; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.search-hero-input input { flex: 1; border: none; padding: 13px 18px; font-size: 15px; outline: none; color: var(--text); }
.search-hero-input button { padding: 13px 22px; background: var(--accent); color: #fff; border: none; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s; }
.search-hero-input button:hover { background: var(--accent-dark); }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 11px 15px; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 7px; text-decoration: none; color: inherit; background: #fff; transition: all .15s; }
.search-result-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.search-result-icon  { font-size: 18px; width: 34px; text-align: center; flex-shrink: 0; }
.search-result-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.search-result-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   ЭКСПОРТ / НАСТРОЙКИ
   ============================================================ */
.export-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.settings-grid { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: var(--border-dark); border-radius: 22px; transition: .2s; }
.toggle-slider:before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: var(--shadow-xs); }
input:checked + .toggle-slider { background: var(--primary); }
input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */
.comment-row { display: flex; gap: 10px; padding: 11px 16px; align-items: flex-start; }
.comment-row.mine { flex-direction: row-reverse; }
.comment-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.comment-bubble { max-width: 75%; }
.comment-row.mine .comment-bubble { align-items: flex-end; display: flex; flex-direction: column; }
.comment-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.comment-row.mine .comment-meta { flex-direction: row-reverse; }
.comment-author { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.comment-time   { font-size: 11px; color: var(--text-light); }
.comment-del    { font-size: 14px; color: var(--text-light); text-decoration: none; opacity: 0; transition: opacity .15s; }
.comment-bubble:hover .comment-del { opacity: 1; }
.comment-del:hover { color: var(--red); }
.comment-text { background: var(--bg); border-radius: 12px; border-bottom-left-radius: 4px; padding: 9px 12px; font-size: 13px; line-height: 1.6; color: var(--text); max-width: 100%; word-break: break-word; }
.comment-row.mine .comment-text { background: var(--primary-light); color: var(--primary); border-radius: 12px; border-bottom-right-radius: 4px; border-bottom-left-radius: 12px; }
.comment-sys { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; font-size: 11.5px; color: var(--text-light); }
.comment-sys-text { background: var(--bg); padding: 3px 10px; border-radius: 20px; }

/* ============================================================
   АНАЛИТИКА — ГРАФИКИ
   ============================================================ */
.charts-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.dashboard-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.reports-grid  { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.mini-bar { height: 7px; background: var(--primary); border-radius: 4px; min-width: 4px; }

/* Воронка */
.funnel-wrap { display: flex; flex-direction: column; gap: 9px; }
.funnel-step { padding: 2px 0; }
.funnel-bar-wrap { display: flex; flex-direction: column; gap: 3px; }
.funnel-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text); }
.funnel-bar   { height: 28px; background: var(--bg); border-radius: var(--radius-sm); overflow: hidden; }
.funnel-fill  { height: 100%; border-radius: var(--radius-sm); display: flex; align-items: center; padding: 0 11px; color: #fff; font-size: 12px; font-weight: 700; transition: width .6s ease; min-width: 38px; }
.funnel-conv  { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   ГОРЯЩИЕ ТУРЫ
   ============================================================ */
.hot-tour-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; transition: all .2s; }
.hot-tour-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hot-tour-header { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; padding: 11px 15px; display: flex; justify-content: space-between; align-items: center; }
.hot-badge { background: rgba(255,255,255,.2); border-radius: 20px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.hot-tour-body { padding: 13px 15px; }
.hot-tour-price { font-size: 22px; font-weight: 800; color: var(--text); }
.hot-tour-old-price { font-size: 13px; text-decoration: line-through; color: var(--text-muted); margin-left: 7px; }
.hot-tour-deadline { font-size: 12px; color: var(--red); font-weight: 600; margin-top: 5px; }

/* ============================================================
   РАЗНОЕ
   ============================================================ */
.source-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; background: var(--bg); color: var(--text-muted); white-space: nowrap; }
#bulk-panel { border-bottom: 1px solid var(--border); background: var(--primary-light); }
.row-check, #select-all { width: 15px; height: 15px; cursor: pointer; accent-color: var(--primary); }

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */
@media (max-width: 1100px) {
    .mobile-toggle { display: flex; }
    .topnav-inner { padding: 0 16px; }
    .topnav-nav {
        position: fixed;
        top: 0; left: -290px; width: 280px; height: 100vh;
        background: #fff;
        flex-direction: column; align-items: stretch;
        padding: 72px 10px 20px;
        transition: left .28s cubic-bezier(.4,0,.2,1);
        z-index: 501; box-shadow: var(--shadow-xl);
        overflow-y: auto; gap: 1px;
    }
    .topnav-nav.open { left: 0; }
    .nav-drop-btn { width: 100%; justify-content: space-between; }
    .dropdown-panel {
        position: static; box-shadow: none;
        opacity: 1; visibility: visible; transform: none;
        border: none; border-radius: 0; display: none;
        background: var(--bg); margin: 3px 0;
    }
    .nav-dropdown.open .dropdown-panel { display: block; }
    .dropdown-grid { grid-template-columns: 1fr; padding: 3px; gap: 1px; background: transparent; }
    .drop-item { padding: 8px 12px; }
    .user-info-top { display: none; }
    .logo-name { display: none; }
    .logo-sub  { display: none; }
}

@media (max-width: 768px) {
    .main-content { padding: 14px; }
    .stats-grid, .kpi-grid { grid-template-columns: repeat(2,1fr); }
    .edit-grid, .view-grid, .form-row { grid-template-columns: 1fr; }
    .operators-layout { flex-direction: column; }
    .operators-layout > div:last-child { width: 100% !important; }
    .charts-grid, .dashboard-grid, .reports-grid { grid-template-columns: 1fr; }
    .import-steps, .export-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-bar input, .filter-bar select { max-width: 100%; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .tabs-bar, .tab-bar-alt { overflow-x: auto; }
    .btn-create span { display: none; }
    .btn-create { width: 36px; padding: 0; justify-content: center; }
}

/* Уведомления */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.notification-success { background: #22c55e; color: white; }
.notification-error { background: #ef4444; color: white; }
.notification-warning { background: #f59e0b; color: white; }
.notification-info { background: #3b82f6; color: white; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   ПРОФЕССИОНАЛЬНЫЕ СТИЛИ ДЛЯ СТРАНИЦ ЗАЯВОК
   ============================================================ */

/* Hero-блоки */
.hero-section {
    background: linear-gradient(135deg, #1a2a4f 0%, #2d52c4 70%, #4a78e0 100%);
    border-radius: 20px;
    padding: 28px 32px;
    margin-bottom: 28px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.hero-title h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.5px;
}
.hero-title p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}
.hero-stats {
    display: flex;
    gap: 32px;
}
.hero-stat {
    text-align: center;
}
.hero-stat-value {
    font-size: 28px;
    font-weight: 800;
}
.hero-stat-label {
    font-size: 11px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group input,
.filter-group select {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}
.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

/* Таблица заявок */
.requests-table {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.requests-table table {
    width: auto;
    min-width: 1200px;
    border-collapse: collapse;
    table-layout: fixed;
}
.requests-table td:last-child { padding-left: 8px; padding-right: 8px; }
.requests-table th {
    padding: 16px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: #fafcff;
    border-bottom: 1px solid #e2e8f0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.requests-table td {
    padding: 14px 10px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    overflow: hidden;
}
.requests-table .cell-clip {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.requests-table tr:last-child td {
    border-bottom: none;
}
.requests-table tr.req-row:hover td {
    background: #f8fafc;
}
.requests-table tr.req-row { cursor: pointer; }
.requests-table tr.req-detail:hover td { background: inherit; }
.requests-table tr.req-detail td { padding: 0; border-bottom: 1px solid #f1f5f9; overflow: visible; }
.req-chevron { text-align: center; color: var(--text-light); padding-left: 8px !important; padding-right: 0 !important; }
.req-chevron-icon { display: inline-block; transition: transform .15s; font-size: 12px; }
.req-detail-panel {
    padding: 18px 24px;
    background: #fafcff;
}
.req-detail-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 18px;
}
.req-detail-group { flex: 1 1 260px; max-width: 340px; }

/* Итинерарий тура (Проживание/Транспорт/Услуги) — общий стиль для списка заявок,
   просмотра и редактирования, см. includes/tour_itinerary.php */
.itinerary { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; background: #fff; }
.itinerary-section + .itinerary-section { border-top: 1px solid #e2e8f0; }
.itinerary-section-head {
    background: #f8fafc;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 8px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.itinerary-line { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; font-size: 13px; line-height: 1.5; }
.itinerary-line:last-child { border-bottom: none; }
.itinerary-line .main { font-weight: 700; color: #1e293b; }
.itinerary-line .meta { color: #64748b; font-size: 12.5px; }
.itinerary-line .sub { color: #94a3b8; font-size: 12px; margin-top: 3px; }
.req-detail-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-mid);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #e2e8f0;
}
.req-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
    font-size: 12.5px;
}
.req-detail-row .k { color: #94a3b8; flex: 0 0 100px; padding-top: 1px; }
.req-detail-row .v { font-weight: 600; color: #1e293b; flex: 1; word-break: break-word; min-width: 0; }
.req-tourist-item { font-size: 12.5px; padding: 3px 0; color: #1e293b; }
.req-detail-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 3px;
    display: block;
}
.req-detail-comment {
    padding: 0 24px 16px;
    background: #fafcff;
    font-size: 12.5px;
    color: #1e293b;
}

/* Поиск туриста в общем справочнике (tourist_directory) внутри .tourist-card —
   см. assets/js/tourist-directory-search.js. Используется на requests_add.php,
   requests_edit.php, requests_view.php. */
.tourist-dir-search { padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--border); }
.tourist-dir-search-input {
    width: 100%; padding: 7px 10px;
    border: 1.5px solid var(--border); border-radius: 7px;
    font-size: 13px; font-family: inherit; color: var(--text);
}
.tourist-dir-search-input:focus { outline: none; border-color: var(--primary-mid); }
.tourist-dir-results { margin-top: 6px; max-height: 180px; overflow-y: auto; }
.tourist-dir-result-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.tourist-dir-result-item:hover { background: var(--primary-light); }
.tourist-dir-result-item .meta { color: var(--text-muted); font-size: 11.5px; margin-left: 4px; }
.tourist-dir-empty { padding: 7px 10px; color: var(--text-muted); font-size: 12.5px; }

/* Переключатель вида */
.view-switch {
    display: flex;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.view-btn {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}
.view-btn.active {
    background: #2d52c4;
    color: white;
}

/* Карточки для просмотра заявки */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}
.info-card {
    background: white;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.info-card-header {
    padding: 16px 20px;
    background: #fafcff;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.info-card-body {
    padding: 18px 20px;
}
.info-line {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.info-line:last-child {
    border-bottom: none;
}
.info-label {
    width: 120px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    flex-shrink: 0;
}
.info-value {
    flex: 1;
    font-size: 13px;
    color: #1e293b;
}
.info-value strong {
    color: #2d52c4;
}

/* Таблица туристов */
.tourist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tourist-table th {
    text-align: left;
    padding: 10px 12px;
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
}
.tourist-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

/* Блоки платежей клиента/оператора (requests_view.php) */
.payment-blocks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) {
    .payment-blocks-grid { grid-template-columns: 1fr; }
}

/* .form-group/.form-control/.form-row/.form-actions — единая копия ближе к началу файла. */

/* Адаптивность */
@media (max-width: 900px) {
    .hero-section { flex-direction: column; align-items: flex-start; }
    .hero-stats { width: 100%; justify-content: space-around; }
    .filter-bar { flex-direction: column; }
    .filter-group { width: 100%; }
    .info-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .requests-table { overflow-x: auto; }
    .requests-table table { min-width: 800px; }
}

/* ============================================
   ВЕРХНЕЕ МЕНЮ (TOPNAV)
   ============================================ */
.topnav {
    position: sticky;
    top: 0;
    z-index: 500;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.topnav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 20px;
}

.topnav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 12px;
}
.logo-img { height: 46px; width: auto; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 16px; font-weight: 800; color: #1a2a4f; }
.logo-sub { font-size: 9px; color: #64748b; text-transform: uppercase; }

.topnav-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    border-radius: 8px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    text-decoration: none;
}
.nav-link:hover { color: #2d52c4; background: rgba(45,82,196,0.08); }
.nav-link.active {
    color: #2d52c4;
    background: #eef2ff;
    font-weight: 600;
}

.nav-dropdown { position: relative; }
.nav-drop-btn { cursor: pointer; }
.drop-icon { width: 10px; height: 10px; transition: transform .2s; }
.nav-dropdown.open .drop-icon { transform: rotate(180deg); }

.dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.18s ease;
    z-index: 600;
    min-width: 240px;
}
.dropdown-panel--right { left: auto; right: 0; }
.nav-dropdown.open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px;
    gap: 4px;
}
.drop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.12s;
}
.drop-item:hover { background: #f8fafc; }
.drop-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.drop-title { font-size: 13px; font-weight: 600; color: #1e293b; }
.drop-sub { font-size: 11px; color: #64748b; }

.dropdown-list { padding: 6px; }
.drop-item-sm {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    transition: background 0.12s;
}
.drop-item-sm:hover { background: #f8fafc; }
.drop-item-featured { color: #2d52c4; font-weight: 600; }
.drop-item-danger:hover { background: #fef2f2; color: #dc2626; }
.dropdown-divider { height: 1px; background: #e2e8f0; margin: 6px; }
.dropdown-header {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.dropdown-footer {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.dropdown-footer a { font-size: 12px; color: #2d52c4; text-decoration: none; }

.topnav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}
.icon-btn:hover { background: rgba(45,82,196,0.08); color: #2d52c4; }
.icon-btn svg { width: 18px; height: 18px; }

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    background: #dc2626;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.btn-create {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 18px;
    height: 36px;
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-create:hover { background: #e55a22; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 6px;
    border-radius: 40px;
    border: 1px solid #e2e8f0;
    background: none;
    cursor: pointer;
    height: 40px;
}
.user-btn:hover { border-color: #2d52c4; background: #eef2ff; }

.user-avatar-top {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #1a2a4f, #2d52c4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
}
.user-info-top { line-height: 1.2; }
.user-name-top { font-size: 13px; font-weight: 600; color: #1e293b; }
.user-role-top { font-size: 10px; color: #64748b; }
.user-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #eef2ff;
}

.notif-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    border-bottom: 1px solid #e2e8f0;
}
.notif-item:hover { background: #f8fafc; }
.notif-icon { font-size: 18px; width: 32px; }
.notif-title { font-size: 13px; font-weight: 600; color: #1e293b; }
.notif-sub { font-size: 11px; color: #64748b; }
.notif-red { border-left: 3px solid #dc2626; }
.notif-blue { border-left: 3px solid #2d52c4; }

.badge-red {
    background: #fef2f2;
    color: #dc2626;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: auto;
}
.mobile-toggle span {
    height: 2px;
    background: #64748b;
    border-radius: 2px;
    transition: 0.25s;
}
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 499;
}

@media (max-width: 1100px) {
    .mobile-toggle { display: flex; }
    .topnav-nav {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 70px 16px 20px;
        transition: left 0.28s ease;
        z-index: 501;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    .topnav-nav.open { left: 0; }
    .nav-drop-btn { justify-content: space-between; width: 100%; }
    .dropdown-panel {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin-top: 5px;
    }
    .nav-dropdown.open .dropdown-panel { display: block; }
    .dropdown-grid { grid-template-columns: 1fr; }
    .user-info-top { display: none; }
    .logo-text { display: none; }
}