/* Bitrix24 Cosmos Style */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

body {
    background-color: #eef2f4;
    font-family: 'Open Sans', Helvetica, Arial, sans-serif;
    color: #535c69;
    font-size: 14px;
    padding: 10px;
}

h4 {
    font-weight: 300;
    font-size: 26px;
    margin-bottom: 20px;
    color: #333;
}

/* Cards */
.card {
    border: none;
    border-radius: 4px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    background-color: #fff;
    margin-bottom: 0; /* Margin handled by grid cols */
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #edeef0;
    font-weight: 600;
    padding: 10px 15px;
    font-size: 14px;
    color: #333;
}

.card-body {
    padding: 15px;
}

/* Forms */
.form-group label {
    font-weight: 600;
    color: #80868e;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
}

.form-control {
    border-radius: 2px;
    border: 1px solid #c6cdd3;
    height: 34px; /* Compact height */
    box-shadow: none;
    font-size: 14px;
    color: #333;
    -webkit-transition: border-color 0.2s;
    -o-transition: border-color 0.2s;
    transition: border-color 0.2s;
    background-color: #fff;
    -webkit-appearance: none; /* Fix for Safari */
    appearance: none;
}

/* Fix for date inputs in WebKit/Opera */
input[type="date"].form-control {
    display: flex;
    align-items: center;
    padding: 0 10px;
    line-height: 32px;
}

.form-control:focus {
    border-color: #2fc6f6;
    box-shadow: none;
    background-color: #fff;
    outline: none;
}
/* --- Стили для уведомлений (Toasts) --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast-msg {
    min-width: 250px;
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    opacity: 0;
    -webkit-transform: translateY(-20px);
    -ms-transform: translateY(-20px);
    transform: translateY(-20px);
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
}

.toast-msg.show {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
}

/* Цвета как в Битрикс24 */
.toast-msg.success { background-color: #9dcf00; } /* Зеленый */
.toast-msg.error { background-color: #ff5752; }   /* Красный */
.toast-msg.info { background-color: #2fc6f6; }    /* Синий */

/* Buttons */
.btn {
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    padding: 0 20px;
    height: 34px; /* Compact height */
    line-height: 32px;
    box-shadow: none;
    -webkit-transition: all 0.2s;
    -o-transition: all 0.2s;
    transition: all 0.2s;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.btn-primary {
    background-color: #2fc6f6;
    border-color: #2fc6f6;
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #00b4e6;
    border-color: #00b4e6;
    outline: none;
}

.btn-success {
    background-color: #9dcf00;
    border-color: #9dcf00;
    color: #fff;
}

.btn-success:hover, .btn-success:focus {
    background-color: #b4d900;
    border-color: #b4d900;
    outline: none;
}

.btn-outline-secondary {
    border-color: #c6cdd3;
    color: #535c69;
    background: #fff;
}

.btn-outline-secondary:hover, .btn-outline-secondary:focus {
    background-color: #f8f9fa;
    border-color: #b0b6bb;
    color: #333;
    outline: none;
}

/* Navigation */
.nav-tabs {
    border-bottom: 1px solid #edeef0;
    margin-bottom: 20px;
}

.nav-tabs .nav-link {
    border: none;
    color: #535c69;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    padding: 10px 15px;
    border-bottom: 2px solid transparent;
    margin-right: 2px;
    transition: color 0.2s, border-bottom-color 0.2s;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    color: #333;
    background-color: transparent;
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    color: #2fc6f6;
    border-bottom: 2px solid #2fc6f6;
    box-shadow: none;
}

/* Results Grid */
.result-card {
    margin-bottom: 30px; /* Vertical spacing */
    padding: 0 15px; /* Horizontal spacing (Bootstrap gutter) */
}

.result-card .card {
    height: auto; /* Allow shrinking */
    min-height: 0;
    margin-bottom: 0;
    border: 1px solid #c6cdd3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.result-card .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    border-color: #bcebfd;
    z-index: 10;
}

/* Disabled (Ineligible) Bank Card */
.result-card .card.disabled {
    background-color: #f7f8f9;
    border-color: #edeff0;
    box-shadow: none;
    opacity: 0.8;
}

.result-card .card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #edeff0;
}

.result-card .card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.result-card .card-title {
    font-size: 13px;
    font-weight: 700;
    color: #525c69;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f2f2f2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Disabled Card Title */
.result-card .card.disabled .card-title {
    color: #aeb4bb;
    border-bottom-color: #edeff0;
}

.success-text {
    color: #333;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 4px;
    line-height: 1.2;
}

.success-text::after {
    content: ' ₽';
    font-size: 13px;
    color: #959ca4;
    font-weight: 400;
}

.error-text {
    color: #aeb4bb;
    font-size: 11px;
    font-style: italic;
    line-height: 1.4;
    margin-top: 4px;
}

.result-card small.text-muted {
    font-size: 11px;
    color: #959ca4 !important;
    display: block;
    margin-bottom: 1px;
}

/* Action Buttons Area */
.cp-buttons-area {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.cp-buttons-area .btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    margin-right: 5px; /* Fallback for gap */
    margin-bottom: 5px;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-muted {
    color: #9b9b9b !important;
}

/* Scrollbar for nav on mobile */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .nav-tabs .nav-link {
        white-space: nowrap;
    }
}