/* =========================================================
   BRAVO CRM — UI FEATURES
   Cmd+K Global Search
   ========================================================= */

/* -------------------------------------------------------
   CMD+K GLOBAL SEARCH
-------------------------------------------------------- */

.search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--border, rgba(15,23,42,.10));
    border-radius: 10px;
    background: var(--surface-2, #f1f5f9);
    color: var(--muted, #64748b);
    font-size: 13px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.search-trigger:hover {
    border-color: #EDC016;
    box-shadow: 0 0 0 3px rgba(237,192,22,.12);
}

.search-trigger__kbd {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(15,23,42,.12));
    font-size: 10px;
    font-weight: 700;
    color: var(--muted, #94a3b8);
    font-family: system-ui, sans-serif;
}

/* Modal overlay */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.search-modal.is-open {
    opacity: 1;
    pointer-events: all;
}

.search-modal__box {
    width: 100%;
    max-width: 560px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(15,23,42,.10));
    border-radius: 20px;
    box-shadow: 0 32px 80px rgba(15,23,42,.22), 0 8px 24px rgba(15,23,42,.12);
    overflow: hidden;
    transform: translateY(-16px) scale(.97);
    transition: transform .22s cubic-bezier(.22,.61,.36,1);
}

.search-modal.is-open .search-modal__box {
    transform: translateY(0) scale(1);
}

.search-modal__input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, rgba(15,23,42,.07));
}

.search-modal__icon { color: var(--muted, #94a3b8); flex-shrink: 0; }

.search-modal__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 500;
    color: var(--text, #0f172a);
}

.search-modal__input::placeholder { color: var(--muted, #94a3b8); }

.search-modal__close {
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid var(--border, rgba(15,23,42,.10));
    background: var(--surface-2, #f1f5f9);
    color: var(--muted, #64748b);
    font-size: 11px;
    cursor: pointer;
}

.search-modal__results {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.search-modal__section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted, #94a3b8);
    padding: 8px 12px 4px;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text, #0f172a);
    transition: background .12s;
}

.search-result:hover,
.search-result.is-active {
    background: var(--surface-2, #f1f5f9);
}

.search-result__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1A1E30, #2d3657);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EDC016;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.search-result__icon--action {
    background: var(--surface-2, #f1f5f9);
    color: var(--muted, #64748b);
}

.search-result__body  { flex: 1; min-width: 0; }
.search-result__name  { font-size: 14px; font-weight: 600; color: var(--text, #0f172a); }
.search-result__sub   { font-size: 12px; color: var(--muted, #94a3b8); margin-top: 1px; }
.search-result__arrow { color: var(--muted, #cbd5e1); font-size: 16px; }

.search-modal__empty {
    text-align: center;
    padding: 32px;
    color: var(--muted, #94a3b8);
    font-size: 14px;
}

/* Dark theme */
:root.theme-dark .search-modal__box {
    background: #1e2433;
    border-color: rgba(255,255,255,.08);
}
:root.theme-dark .search-modal__input { color: #f1f5f9; }
:root.theme-dark .search-result:hover,
:root.theme-dark .search-result.is-active { background: rgba(255,255,255,.06); }
:root.theme-dark .search-trigger {
    background: var(--surface-2, #252d42);
    border-color: rgba(255,255,255,.08);
}
:root.theme-dark .search-trigger__kbd {
    background: var(--surface, #1e2433);
    border-color: rgba(255,255,255,.10);
}

/* =========================================================
   PURCHASE PAGES — нативные стили вместо inline
   ========================================================= */

.purchase-wrap {
    max-width: 560px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 40px;
}

/* Прогресс-шаги */
.pur-steps {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.pur-steps__item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pur-steps__dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    flex-shrink: 0;
    transition: all .2s;
}

.pur-steps__item--done .pur-steps__dot {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.pur-steps__item--active .pur-steps__dot {
    background: linear-gradient(135deg, #EDC016, #F28739);
    border-color: #EDC016;
    color: #1A1E30;
    box-shadow: 0 0 0 4px rgba(237,192,22,.18);
}

.pur-steps__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.pur-steps__item--active .pur-steps__label { color: var(--text); }
.pur-steps__item--done  .pur-steps__label  { color: var(--success-text); }

.pur-steps__line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
    min-width: 20px;
}

.pur-steps__line--done { background: #16a34a; }

/* Карточка */
.pur-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.pur-card__head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.pur-card__body { padding: 18px 22px; }

.pur-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.pur-row + .pur-row { border-top: 1px solid var(--border-soft); }

.pur-row__label { font-size: 13px; color: var(--muted); }

.pur-row__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.pur-row__value--big {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #EDC016, #F28739);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pur-divider { height: 1px; background: var(--border); margin: 14px 0; }
.pur-divider--brand { background: linear-gradient(90deg, #EDC016, #F28739); height: 2px; border-radius: 999px; }

/* Варианты выбора метода/провайдера */
.pur-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s, transform .2s;
    margin-bottom: 12px;
}

.pur-option:last-child { margin-bottom: 0; }

.pur-option:hover {
    border-color: #EDC016;
    box-shadow: 0 4px 16px rgba(237,192,22,.16);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--text);
}

.pur-option__icon { font-size: 36px; flex-shrink: 0; line-height: 1; }
.pur-option__body { flex: 1; min-width: 0; }
.pur-option__name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.pur-option__desc { font-size: 12px; color: var(--muted); }
.pur-option__meta { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.pur-option__arrow { font-size: 22px; color: #EDC016; flex-shrink: 0; }

/* Инфо-блок */
.pur-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 18px;
}

.pur-info__title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pur-info__list {
    margin: 0;
    padding-left: 18px;
}

.pur-info__list li {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 5px;
    line-height: 1.45;
}

/* Кнопки */
.pur-actions { display: flex; gap: 12px; }

.pur-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all .2s;
    cursor: pointer;
}

.pur-btn--ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    flex: 1;
}

.pur-btn--ghost:hover {
    background: var(--surface-2);
    text-decoration: none;
    color: var(--text);
}

.pur-btn--primary {
    background: linear-gradient(135deg, #EDC016 0%, #F28739 100%);
    color: #1A1E30 !important;
    flex: 2;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(237,192,22,.28);
}

.pur-btn--primary:hover {
    filter: brightness(1.05);
    box-shadow: 0 6px 22px rgba(237,192,22,.38);
    transform: translateY(-1px);
    text-decoration: none;
}

.pur-cancel { text-align: center; font-size: 12px; margin-top: 4px; }
.pur-cancel a { color: var(--muted); text-decoration: underline; }
.pur-cancel a:hover { color: var(--text); }


/* =========================================================
   ACCOUNT VERIFICATION PROGRESS
   ========================================================= */

.acc-progress {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px 26px;
    box-shadow: var(--shadow-md);
}

.acc-progress__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.acc-progress__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.acc-progress__pct {
    font-size: 13px;
    font-weight: 700;
    color: #EDC016;
}

.acc-progress__bar-wrap {
    height: 6px;
    background: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 18px;
}

.acc-progress__bar {
    height: 100%;
    background: linear-gradient(90deg, #EDC016, #F28739);
    border-radius: 999px;
    transition: width .6s cubic-bezier(.22,.61,.36,1);
}

.acc-progress__steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 640px) {
    .acc-progress__steps { grid-template-columns: 1fr 1fr; }
}

.acc-step {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
}

.acc-step--done {
    background: rgba(22,163,74,.07);
    border-color: rgba(22,163,74,.20);
}

.acc-step--warn {
    background: rgba(245,158,11,.07);
    border-color: rgba(245,158,11,.20);
}

:root.theme-dark .acc-step--done {
    background: rgba(14,203,129,.09);
    border-color: rgba(14,203,129,.22);
}

:root.theme-dark .acc-step--warn {
    background: rgba(245,158,11,.09);
    border-color: rgba(245,158,11,.22);
}

.acc-step__icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}

.acc-step--done .acc-step__icon { background: #16a34a; color: #fff; }
.acc-step--warn .acc-step__icon { background: rgba(245,158,11,.15); color: #b45309; }

:root.theme-dark .acc-step--done .acc-step__icon { background: #0ecb81; color: #0b0e11; }
:root.theme-dark .acc-step--warn .acc-step__icon { color: #f59e0b; background: rgba(245,158,11,.15); }

.acc-step__body { min-width: 0; }

.acc-step__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.acc-step__sub {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
    line-height: 1.4;
}

.acc-step__sub a { color: var(--link); text-decoration: none; }
.acc-step__sub a:hover { text-decoration: underline; }


/* =========================================================
   EMPTY STATES — улучшенные
   ========================================================= */

.bravo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 52px 24px;
    gap: 14px;
}

.bravo-empty__icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-2);
    margin-bottom: 4px;
}

.bravo-empty__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.bravo-empty__sub {
    font-size: 13px;
    color: var(--muted);
    max-width: 280px;
    line-height: 1.5;
}


/* =========================================================
   DATA-TIP TOOLTIP
   ========================================================= */

[data-tip] { position: relative; }

[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--surface);
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    z-index: 200;
}

[data-tip]:hover::after { opacity: 1; }
