/* =========================================================
   Новый клиент / очередь просчетов
   ========================================================= */

.new-client-top-btn,
.new-client-menu-btn {
    background: #16a34a !important;
    color: #ffffff !important;
    border: none !important;
}

.new-calc-modal-box {
    width: 760px;
}

.new-calc-hint {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
}

.new-calc-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.new-calc-action {
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
}

.new-calc-action.now {
    background: #16a34a !important;
}

.new-calc-action.next {
    background: #1d4ed8 !important;
}

.new-calc-action.wait {
    background: #f97316 !important;
}

.new-calc-action.slow {
    background: #64748b !important;
}

.calc-queue-badge {
    display: block;
    width: fit-content;
    margin-top: 5px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 11px;
    font-weight: 900;
}

.calc-queue-badge.current {
    background: #dcfce7;
    color: #166534;
}

.calc-queue-badge.next {
    background: #dbeafe;
    color: #1d4ed8;
}

.calc-queue-badge.postponed {
    background: #ffedd5;
    color: #c2410c;
}

.calc-queue-badge.not-urgent {
    background: #f1f5f9;
    color: #475569;
}

.calc-queue-badge.sent {
    background: #ecfdf5;
    color: #047857;
}

.calc-queue-sent-btn {
    width: auto !important;
    min-height: 34px !important;
    padding: 6px 10px !important;
    border-radius: 10px !important;
    background: #16a34a !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

.calc-queue-sent-label {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
    font-weight: 900;
}

/* Всплывающее окно в углу экрана */
.calc-queue-floating {
    position: fixed;
    right: 14px;
    bottom: 92px;
    z-index: 2147483000;
    width: 320px;
    max-width: calc(100vw - 28px);
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .22);
    overflow: hidden;
}

.calc-queue-floating-head {
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 12px !important;
    border-radius: 0 !important;
    background: #111827 !important;
    color: #ffffff !important;
    border: none !important;
}

.calc-queue-floating-head span {
    font-size: 14px;
    font-weight: 900;
}

.calc-queue-floating-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
    font-size: 14px;
}

.calc-queue-floating-body {
    padding: 10px;
    background: #f8fafc;
}

.calc-queue-floating.collapsed .calc-queue-floating-body {
    display: none;
}

.calc-queue-floating-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    margin-bottom: 8px;
}

.calc-queue-floating-stats div {
    padding: 6px 4px;
    border-radius: 10px;
    background: #ffffff;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.calc-queue-floating-stats span {
    display: block;
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    margin-bottom: 2px;
}

.calc-queue-floating-stats b {
    color: #111827;
    font-size: 15px;
}

.calc-queue-floating-list {
    display: grid;
    gap: 6px;
}

.calc-queue-floating-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
    background: #ffffff;
    border-left: 4px solid #cbd5e1;
}

.calc-queue-floating-item.current {
    border-left-color: #16a34a;
}

.calc-queue-floating-item.next {
    border-left-color: #1d4ed8;
}

.calc-queue-floating-item.postponed {
    border-left-color: #f97316;
}

.calc-queue-floating-item.not-urgent {
    border-left-color: #64748b;
}

.calc-queue-floating-item strong {
    display: block;
    color: #111827;
    font-size: 13px;
    line-height: 1.12;
}

.calc-queue-floating-item span {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    margin-top: 3px;
}

.calc-queue-floating-item b {
    color: #111827;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 950px) {
    .new-calc-modal-box {
        width: 100% !important;
        max-width: 100% !important;
    }

    .new-calc-action-grid {
        grid-template-columns: 1fr !important;
    }

    .new-calc-action {
        min-height: 48px !important;
    }

    .calc-queue-floating {
        left: 8px;
        right: 8px;
        bottom: 78px;
        width: auto;
        max-width: none;
    }

    .calc-queue-floating-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .calc-queue-sent-btn {
        width: 100% !important;
        min-height: 40px !important;
    }
}
