/* Современный дизайн панели управления */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #2d3748;
}

.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    padding: 0;
}

.navbar-modern .navbar-brand {
    font-size: 20px;
    font-weight: 600;
    color: #4a5568 !important;
    padding: 15px 20px;
}

.navbar-modern .navbar-brand i {
    margin-right: 8px;
    color: #667eea;
}

.navbar-modern .navbar-nav > li > a {
    font-size: 15px;
    font-weight: 500;
    color: #4a5568 !important;
    padding: 15px 20px;
    transition: all 0.3s ease;
}

.navbar-modern .navbar-nav > li > a:hover,
.navbar-modern .navbar-nav > li > a:focus {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
}

.navbar-modern .navbar-nav > .active > a,
.navbar-modern .navbar-nav > .active > a:hover,
.navbar-modern .navbar-nav > .active > a:focus {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    border-radius: 8px;
    margin: 5px 10px;
    padding: 10px 20px;
}

.main-content {
    padding: 10px 0;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 1400px;
}

.container-fluid-custom {
    padding-left: 20px;
    padding-right: 20px;
}

/* Современные карточки */
.card-modern {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.card-modern .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
    padding: 20px 25px;
    border: none;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-modern .card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.card-modern .card-header .card-header-actions {
    display: flex;
    gap: 10px;
}

.card-modern .card-header .card-header-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.card-modern .card-header .card-header-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.card-modern .card-body {
    padding: 25px;
}

/* Статистические карточки */
.stats-card-modern {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 20px;
}

.stats-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
}

.stats-card-modern .stats-icon {
    font-size: 20px;
    margin-bottom: 8px;
    color: #667eea;
}

.stats-card-modern .stats-number {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
}

.stats-card-modern .stats-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Компактные статистические карточки - оптимизированные размеры */
.stats-card-compact {
    padding: 8px 12px;
    margin-bottom: 10px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.stats-card-compact .stats-icon {
    font-size: 16px;
    margin-bottom: 4px;
    color: #667eea;
}

.stats-card-compact .stats-number {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    color: #2d3748;
}

.stats-card-compact .stats-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}



/* Таблицы */
.table-modern {
    font-size: 15px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    position: relative;
}

.table-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.table-modern thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    border: none;
    position: relative;
    overflow: hidden;
}

.table-modern thead th::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.table-modern thead th:hover::before {
    left: 100%;
}

.table-modern tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.table-modern tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.table-modern tbody tr:nth-child(even) {
    background: rgba(248, 249, 250, 0.5);
}

.table-modern tbody tr:nth-child(even):hover {
    background: rgba(102, 126, 234, 0.08);
}

.table-modern tbody td {
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.3s ease;
}

.table-modern tbody td:first-child {
    word-wrap: break-word;
    max-width: 0;
}

.table-modern tbody td:hover {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
}

/* Анимированные иконки в таблицах */
.table-modern .fas {
    transition: all 0.3s ease;
}

.table-modern tr:hover .fas {
    transform: scale(1.1);
    color: #667eea;
}

/* Улучшенные ссылки в таблицах */
.table-modern a {
    color: #667eea;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.table-modern a:hover {
    color: #764ba2;
    text-decoration: none;
}

.table-modern a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.table-modern a:hover::after {
    width: 100%;
}

/* Анимированные коды */
.table-modern code {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.table-modern code:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.05);
}

/* Кнопки */
.btn-modern {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

/* Стандартизированные размеры кнопок для таблиц */
.table-modern .btn-group .btn-modern {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 4px;
}

.table-modern .btn-group .btn-modern:last-child {
    margin-right: 0;
}

.table-modern .btn-group .btn-modern i {
    font-size: 14px;
    margin: 0;
    color: white !important;
}

.table-modern .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Мобильные размеры кнопок */
@media (max-width: 768px) {
    .table-modern .btn-group .btn-modern {
        width: 32px;
        height: 32px;
    }
    
    .table-modern .btn-group .btn-modern i {
        font-size: 12px;
        color: white !important;
    }
}

@media (max-width: 576px) {
    .table-modern .btn-group .btn-modern {
        width: 28px;
        height: 28px;
    }
    
    .table-modern .btn-group .btn-modern i {
        font-size: 11px;
        color: white !important;
    }
}

.btn-modern-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-modern-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-modern-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-modern-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
    color: white;
}

.btn-modern-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.btn-modern-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
    color: white;
}

.btn-modern-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-modern-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
    color: white;
}

.btn-modern-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn-modern-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
    color: white;
}

/* Бейджи */
.badge-modern {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-modern-success {
    background: rgba(72, 187, 120, 0.1);
    color: #38a169;
}

.badge-modern-warning {
    background: rgba(237, 137, 54, 0.1);
    color: #dd6b20;
}

.badge-modern-info {
    background: rgba(66, 153, 225, 0.1);
    color: #3182ce;
}

.badge-modern-secondary {
    background: rgba(113, 128, 150, 0.1);
    color: #718096;
}

/* Формы */
.form-modern .form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-modern .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-modern select.form-control {
    padding: 10px 16px;
    height: auto;
    line-height: 1.5;
}

.form-modern select.form-control option {
    padding: 8px 12px;
    line-height: 1.4;
}

.form-modern .form-group {
    margin-bottom: 20px;
}

.form-modern label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Индикаторы состояния парсинга */
.parsing-indicator {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.parsing-indicator.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.parsing-progress {
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    height: 6px;
    margin-top: 4px;
}

.parsing-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    position: relative;
}

.parsing-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    position: relative;
}

.status-indicator.active {
    background: #48bb78;
    animation: status-pulse 2s infinite;
}

.status-indicator.inactive {
    background: #718096;
}

.status-indicator.processing {
    background: #667eea;
    animation: status-spin 1s infinite;
}

@keyframes status-pulse {
    0% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(72, 187, 120, 0); }
    100% { box-shadow: 0 0 0 0 rgba(72, 187, 120, 0); }
}

@keyframes status-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Улучшенные карточки статистики */
.stats-card-modern {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.stats-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stats-card-modern:hover::before {
    transform: scaleX(1);
}

.stats-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stats-card-modern .stats-icon {
    font-size: 24px;
    margin-bottom: 12px;
    color: #667eea;
    transition: all 0.3s ease;
}

.stats-card-modern:hover .stats-icon {
    transform: scale(1.2);
    color: #764ba2;
}

.stats-card-modern .stats-number {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.stats-card-modern:hover .stats-number {
    color: #667eea;
}

.stats-card-modern .stats-label {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .theme-toggle {
        position: static;
        margin: 10px;
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 15px 0;
    }
    
    .card-modern .card-body {
        padding: 15px;
    }
    
    .stats-card-modern {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stats-card-modern .stats-number {
        font-size: 24px;
    }
    
    .stats-card-modern .stats-icon {
        font-size: 20px;
    }
    
    .table-modern tbody td {
        padding: 8px;
        font-size: 13px;
    }
    
    .table-modern thead th {
        padding: 10px 8px;
        font-size: 11px;
    }
    
    .card-modern .card-header {
        padding: 15px;
    }
    
    .card-modern .card-header h3 {
        font-size: 16px;
    }
    
    .navbar-modern .navbar-brand {
        font-size: 18px;
        padding: 12px 15px;
    }
    
    .navbar-modern .navbar-nav > li > a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .btn-modern {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .badge-modern {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
    }
    
    .theme-toggle i {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .theme-toggle .theme-text {
        font-size: 12px;
    }
    
    /* Мобильная таблица */
    .table-modern {
        font-size: 12px;
    }
    
    .table-modern th:nth-child(n+6),
    .table-modern td:nth-child(n+6) {
        display: none;
    }
    
    .table-modern .btn-group {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .table-modern .btn-group .btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .parsing-progress {
        height: 4px;
    }
    
    .status-indicator {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 576px) {
    .container-fluid-custom {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .main-content {
        padding: 10px 0;
    }
    
    .card-modern {
        margin-bottom: 20px;
    }
    
    .card-modern .card-body {
        padding: 12px;
    }
    
    .stats-card-modern {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .stats-card-modern .stats-number {
        font-size: 20px;
    }
    
    .stats-card-modern .stats-icon {
        font-size: 18px;
    }
    
    .table-modern {
        font-size: 11px;
    }
    
    .table-modern tbody td {
        padding: 6px;
    }
    
    .table-modern thead th {
        padding: 8px 6px;
        font-size: 10px;
    }
    
    .table-modern th:nth-child(n+4),
    .table-modern td:nth-child(n+4) {
        display: none;
    }
    
    .navbar-modern .navbar-brand {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .navbar-modern .navbar-nav > li > a {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .theme-toggle {
        top: 5px;
        right: 5px;
        padding: 4px 8px;
    }
    
    .theme-toggle i {
        font-size: 12px;
        margin-right: 4px;
    }
    
    .theme-toggle .theme-text {
        font-size: 10px;
    }
    
    /* Мобильные карточки статистики в одну колонку */
    .stats-card-modern {
        text-align: left;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .stats-card-modern .stats-icon {
        margin-bottom: 0;
    }
    
    .stats-card-modern .stats-content {
        flex: 1;
    }
    
    .stats-card-modern .stats-number {
        margin-bottom: 2px;
        font-size: 18px;
    }
    
    .stats-card-modern .stats-label {
        font-size: 11px;
    }
}

/* Row with header and stats */
.header-stats-row {
  margin-bottom: 20px;
}

.header-stats-row .page-header-modern,
.header-stats-row .stats-card-modern {
  margin-bottom: 0; /* Override default margin */
}

.header-stats-row .page-header-modern {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 15px 21px 15px;
}

/* Horizontal stat cards for header */
.header-stats-row .stats-card-mini {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 15px;
}

.header-stats-row .stats-card-mini .stats-icon {
    font-size: 22px;
    margin-bottom: 0;
}

.header-stats-row .stats-card-mini .stats-number {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0;
}

.header-stats-row .stats-card-mini .stats-label {
    font-size: 12px;
    white-space: nowrap;
}

/* Stat cards for detail pages (specific to cert/decl detail pages) */
.stats-card-detail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stats-card-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.stats-card-detail i {
    font-size: 18px;
    margin-bottom: 8px;
    opacity: 0.9;
}

.stats-card-detail .stats-number {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stats-card-detail .stats-label {
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Special styling for document number card */
.stats-card-detail-wide {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stats-card-detail .stats-number-small {
    font-size: 14px;
    word-break: break-all;
    line-height: 1.3;
}

/* Different colors for different stat cards in detail view */
.stats-card-detail:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stats-card-detail:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Responsive design for detail stat cards */
@media (max-width: 768px) {
    .stats-card-detail {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .stats-card-detail i {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .stats-card-detail .stats-number {
        font-size: 16px;
    }
    
    .stats-card-detail .stats-number-small {
        font-size: 12px;
    }
    
    .stats-card-detail .stats-label {
        font-size: 10px;
    }
}

/* Country statistics display */
.country-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.country-stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.country-name {
    font-size: 13px;
    font-weight: 500;
    color: #495057;
}

.country-name i {
    color: #6c757d;
    margin-right: 6px;
}

.country-count {
    font-size: 14px;
    font-weight: 700;
    color: #007bff;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 40px;
    text-align: center;
}

/* Dark theme for country stats */
[data-theme="dark"] .country-stat-item {
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    border-color: #6b7280;
}

[data-theme="dark"] .country-stat-item:hover {
    background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
}

[data-theme="dark"] .country-name {
    color: #e5e7eb;
}

[data-theme="dark"] .country-name i {
    color: #9ca3af;
}

[data-theme="dark"] .country-count {
    color: #60a5fa;
    background: #1e3a8a;
}

/* Responsive design for country stats */
@media (max-width: 768px) {
    .country-stat-item {
        padding: 6px 10px;
        margin-bottom: 6px;
    }
    
    .country-name {
        font-size: 12px;
    }
    
    .country-count {
        font-size: 12px;
        padding: 1px 6px;
    }
}

/* Country flag items for settings page */
.country-flag-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 4px 8px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #495057;
    transition: all 0.3s ease;
}

.country-flag-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.country-flag-item i {
    color: #6c757d;
    margin-right: 4px;
}

/* Dark theme for country flags */
[data-theme="dark"] .country-flag-item {
    background: #374151;
    border-color: #6b7280;
    color: #e5e7eb;
}

[data-theme="dark"] .country-flag-item:hover {
    background: #4b5563;
    border-color: #9ca3af;
}

[data-theme="dark"] .country-flag-item i {
    color: #9ca3af;
}

/* Темная тема */
[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --bg-card: #374151;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --border-color: #4a5568;
    --accent-color: #667eea;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: var(--text-primary);
}

[data-theme="dark"] .navbar-modern {
    background: rgba(45, 55, 72, 0.95);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .navbar-modern .navbar-brand,
[data-theme="dark"] .navbar-modern .navbar-nav > li > a {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .navbar-modern .navbar-nav > .active > a,
[data-theme="dark"] .navbar-modern .navbar-nav > .active > a:hover,
[data-theme="dark"] .navbar-modern .navbar-nav > .active > a:focus {
    color: white !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

[data-theme="dark"] .card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .card-modern .card-body {
    color: var(--text-primary);
}

[data-theme="dark"] .stats-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .stats-card-modern .stats-number {
    color: var(--text-primary);
}

[data-theme="dark"] .stats-card-modern:hover .stats-number {
    color: var(--accent-color);
}

[data-theme="dark"] .table-modern {
    background: var(--bg-card);
}

[data-theme="dark"] .table-modern tbody tr:nth-child(even) {
    background: rgba(74, 85, 104, 0.3);
}

[data-theme="dark"] .table-modern tbody tr:hover {
    background: rgba(102, 126, 234, 0.1);
}

[data-theme="dark"] .table-modern tbody tr:nth-child(even):hover {
    background: rgba(102, 126, 234, 0.15);
}

[data-theme="dark"] .table-modern tbody td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .table-modern a {
    color: var(--accent-color);
}

[data-theme="dark"] .table-modern a:hover {
    color: #818cf8;
}

[data-theme="dark"] .table-modern code {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .badge-modern-secondary {
    background: rgba(74, 85, 104, 0.3);
    color: var(--text-secondary);
}

/* Переключатель темы */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.theme-toggle i {
    font-size: 16px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.theme-toggle .theme-icon {
    color: #667eea;
}

.theme-toggle .theme-text {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
}

[data-theme="dark"] .theme-toggle {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .theme-toggle .theme-text {
    color: var(--text-primary);
}

[data-theme="dark"] .theme-toggle .theme-icon {
    color: #fbbf24;
}

/* Анимация переключения темы */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Стили для настроек */
.radio {
    margin-bottom: 10px;
}

.radio label {
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.radio label span {
    flex: 1;
    text-align: left;
}

.radio label:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.radio input[type="radio"] {
    margin-left: 8px;
    margin-right: 16px;
    transform: scale(1.3);
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.radio input[type="radio"]:checked + span,
.radio label:has(input[type="radio"]:checked),
.radio.active label {
    border-color: var(--primary-color) !important;
    background: rgba(102, 126, 234, 0.1) !important;
    color: var(--primary-color) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2) !important;
}

/* Альтернативный способ для старых браузеров */
.radio input[type="radio"]:checked ~ span,
.radio input[type="radio"]:checked {
    border-color: var(--primary-color);
}

/* Улучшенные стили для групп радиокнопок */
.settings-radio-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.settings-radio-row .col-md-6 {
    flex: 1;
}

.settings-radio-row .radio {
    margin-bottom: 0;
    height: 100%;
}

.settings-radio-row .radio label {
    height: 100%;
    min-height: 50px;
    justify-content: flex-start;
    text-align: left;
    word-wrap: break-word;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Темная тема для настроек */
[data-theme="dark"] .radio label {
    color: var(--text-primary);
}

[data-theme="dark"] .form-group label {
    color: var(--text-primary);
}

[data-theme="dark"] .help-block {
    color: var(--text-secondary);
}

/* Стили для настроек органов */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.settings-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.settings-toggle label {
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 500;
}

.settings-content {
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Улучшение стилей для статистики настроек */
.stats-card-settings {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card-settings:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-card-settings i {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stats-card-settings .stats-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.stats-card-settings .stats-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 500;
}

/* Стили для переключателей настроек */
.settings-radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.settings-radio-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-radio-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.settings-radio-item input[type="radio"] {
    margin-right: 8px;
}

.settings-radio-item.active {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

.settings-radio-item label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.animate-pulse {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Система уведомлений */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: all;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left-color: #48bb78;
}

.notification.error {
    border-left-color: #f56565;
}

.notification.warning {
    border-left-color: #ed8936;
}

.notification.info {
    border-left-color: #4299e1;
}

.notification-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    color: #48bb78;
    background: rgba(72, 187, 120, 0.1);
}

.notification.error .notification-icon {
    color: #f56565;
    background: rgba(245, 101, 101, 0.1);
}

.notification.warning .notification-icon {
    color: #ed8936;
    background: rgba(237, 137, 54, 0.1);
}

.notification.info .notification-icon {
    color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 2px;
}

.notification-message {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-close:hover {
    background: rgba(160, 174, 192, 0.1);
    color: #718096;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transform-origin: left;
    animation: notification-progress 5s linear forwards;
}

@keyframes notification-progress {
    0% { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* Темная тема для уведомлений */
[data-theme="dark"] .notification {
    background: var(--bg-card);
    border-left-color: var(--accent-color);
}

[data-theme="dark"] .notification-title {
    color: var(--text-primary);
}

[data-theme="dark"] .notification-message {
    color: var(--text-secondary);
}

[data-theme="dark"] .notification-close {
    color: var(--text-secondary);
}

[data-theme="dark"] .notification-close:hover {
    color: var(--text-primary);
    background: rgba(74, 85, 104, 0.3);
}

/* Адаптивность уведомлений */
@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        padding: 12px 16px;
    }
    
    .notification-icon {
        font-size: 16px;
        width: 20px;
        height: 20px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
}

/* Простая таблица без DataTables */
.table-simple {
    font-size: 15px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

.table-simple thead th {
    background: #f8f9fa;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 18px 15px;
    border-top: none;
    border-bottom: 2px solid #e2e8f0;
}

.table-simple tbody td {
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid #e2e8f0;
}

[data-theme="dark"] .table-simple {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .table-simple thead th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .table-simple tbody td {
    border-color: var(--border-color);
}

/* Стили для страницы просмотра */
.page-header-modern {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .page-header-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.page-title-modern {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-theme="dark"] .page-title-modern {
    color: var(--text-primary);
}

.page-subtitle-modern {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-modern {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #dee2e6;
}

[data-theme="dark"] .code-modern {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.stats-card-vertical {
    background: rgba(102, 126, 234, 0.05);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.stats-card-vertical:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

[data-theme="dark"] .stats-card-vertical {
    background: rgba(102, 126, 234, 0.1);
}

.stats-card-vertical i {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 8px;
}

.stats-card-vertical .stats-number {
    font-size: 18px;
    font-weight: 700;
}

.stats-card-vertical .stats-label {
    font-size: 13px;
    color: #718096;
}

[data-theme="dark"] .stats-card-vertical .stats-label {
    color: var(--text-secondary);
}

.list-group-modern {
    padding-left: 0;
    list-style: none;
}

.list-group-item-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.list-group-item-modern:last-child {
    border-bottom: none;
}

[data-theme="dark"] .list-group-item-modern {
    border-color: var(--border-color);
}

.list-group-item-modern span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.alert-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
}

.alert-modern i {
    font-size: 20px;
}

.alert-modern-info {
    background: rgba(66, 153, 225, 0.1);
    color: #3182ce;
}

[data-theme="dark"] .alert-modern-info {
    color: #90cdf4;
}

.alert-modern-warning {
    background: rgba(237, 137, 54, 0.1);
    color: #dd6b20;
}

[data-theme="dark"] .alert-modern-warning {
    color: #f6ad55;
}

.btn-modern-secondary {
    background: #a0aec0;
    color: white;
}

.btn-modern-secondary:hover {
    background: #718096;
    color: white;
}

/* Вертикальные карточки статистики (для правой колонки) */
.stats-card-vertical {
    text-align: center;
    padding: 20px 10px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stats-card-vertical:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-card-vertical i {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.stats-card-vertical .stats-number {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 5px 0;
    display: block;
}

.stats-card-vertical .stats-label {
    font-size: 12px;
    color: #718096;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Список технической информации */
.info-list {
    margin: 0;
    padding: 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item:hover {
    background-color: #f8fafc;
    margin: 0 -15px;
    padding-left: 15px;
    padding-right: 15px;
    border-radius: 6px;
}

.info-label {
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

.info-label i {
    margin-right: 6px;
    color: #667eea;
    width: 16px;
}

.info-value {
    font-size: 13px;
    color: #2d3748;
    font-weight: 600;
}

/* Улучшенные alert-modern компоненты */
.alert-modern {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid;
    margin-bottom: 20px;

/* Specific font size for global-started-at */
#global-monitoring-content .monitor-value small#global-started-at {
    font-size: 1rem !important; /* Increase font size to 1rem (typically 16px) */
}


/* Стили для кастомного генератора */
.custom-count-generator {
    display: flex;
    flex-direction: column;
}

.custom-count-generator label {
    font-size: 12px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 5px;
}

.custom-count-generator .input-group {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.custom-count-generator .form-control {
    border-right: none;
    text-align: center;
}

.custom-count-generator .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.dark-theme .custom-count-generator label {
    color: #adb5bd;
}

.dark-theme .custom-count-generator .form-control {
    background-color: #343a40;
    border-color: #454d55;
    color: #e2e8f0;
}
    transition: all 0.3s ease;
}

.alert-modern i {
    font-size: 18px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-modern div {
    flex: 1;
}

.alert-modern strong {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.alert-modern small {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.alert-modern-success {
    background-color: #f0fff4;
    border-color: #68d391;
    color: #22543d;
}

.alert-modern-success i {
    color: #48bb78;
}

.alert-modern-warning {
    background-color: #fffbf0;
    border-color: #f6e05e;
    color: #744210;
}

.alert-modern-warning i {
    color: #ed8936;
}

.alert-modern-info {
    background-color: #f0f8ff;
    border-color: #63b3ed;
    color: #2a4365;
}

.alert-modern-info i {
    color: #4299e1;
}

.alert-modern-danger {
    background-color: #fff5f5;
    border-color: #fc8181;
    color: #742a2a;
}

.alert-modern-danger i {
    color: #e53e3e;
}

/* Темная тема для новых компонентов */
[data-theme="dark"] .stats-card-vertical {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .stats-card-vertical i {
    color: #81e6d9;
}

[data-theme="dark"] .stats-card-vertical .stats-number {
    color: #f7fafc;
}

[data-theme="dark"] .stats-card-vertical .stats-label {
    color: #a0aec0;
}

[data-theme="dark"] .info-item {
    border-bottom-color: #4a5568;
}

[data-theme="dark"] .info-item:hover {
    background-color: #2d3748;
}

[data-theme="dark"] .info-label {
    color: #a0aec0;
}

[data-theme="dark"] .info-label i {
    color: #81e6d9;
}

[data-theme="dark"] .info-value {
    color: #f7fafc;
}

[data-theme="dark"] .alert-modern-success {
    background-color: #1a202c;
    border-color: #38a169;
    color: #c6f6d5;
}

[data-theme="dark"] .alert-modern-warning {
    background-color: #1a202c;
    border-color: #d69e2e;
    color: #faf089;
}

[data-theme="dark"] .alert-modern-info {
    background-color: #1a202c;
    border-color: #3182ce;
    color: #bee3f8;
}

[data-theme="dark"] .alert-modern-danger {
    background-color: #1a202c;
    border-color: #e53e3e;
    color: #fed7d7;
}

/* Темная тема для select элементов */
[data-theme="dark"] .form-modern select.form-control {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

/* Темная тема для label элементов */
[data-theme="dark"] .form-modern label {
    color: #e2e8f0;
    font-weight: 600;
}

/* Темная тема для input элементов */
[data-theme="dark"] .form-modern .form-control {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .form-modern .form-control:focus {
    background-color: #374151;
    color: #f7fafc;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Темная тема для textarea элементов */
[data-theme="dark"] .form-modern textarea.form-control {
    background-color: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

[data-theme="dark"] .form-modern textarea.form-control:focus {
    background-color: #374151;
    color: #f7fafc;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

[data-theme="dark"] .form-modern select.form-control option {
    background-color: #2d3748;
    color: #e2e8f0;
}
/* Стили для матрицы генератора стран */
.matrix-generator {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.matrix-generator-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 13px;
    display: block;
}

.matrix-generator .btn-group .btn {
    border-radius: 6px;
    margin-right: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    transition: all 0.3s ease;
}

.matrix-generator .btn-outline-success:hover {
    background: #28a745;
    border-color: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.custom-count-generator.input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 6px;
    overflow: hidden;
}

.custom-count-generator .form-control {
    border-left: none;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

.custom-count-generator .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 8px 14px;
    transition: all 0.3s ease;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.custom-count-generator .btn-success:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Темная тема для матрицы генератора */
.dark-theme .matrix-generator {
    background: #2d3748;
    border-color: #4a5568;
}

.dark-theme .matrix-generator-label {
    color: #e2e8f0;
}

.dark-theme .matrix-generator .btn-outline-success {
    color: #48bb78;
    border-color: #48bb78;
}

.dark-theme .matrix-generator .btn-outline-success:hover {
    background: #48bb78;
    color: white;
}

.dark-theme .custom-count-generator .form-control {
    background-color: #343a40;
    border-color: #454d55;
    color: #e2e8f0;
}


/* Стили для мониторинга (используется на странице KG сертификатов) */
/* Стили для блока мониторинга */
.monitor-item {
    padding: 16px; /* 1rem -> 16px */
    border-right: 1px solid #e9ecef;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#global-monitoring-content .col-md-2 .monitor-item,
#global-monitoring-content .col-md-3 .monitor-item,
#global-monitoring-content .col-md-4 .monitor-item {
    border-right: 1px solid #e9ecef;
}

#global-monitoring-content .col-md-2:last-child .monitor-item,
#global-monitoring-content .col-md-3:last-child .monitor-item,
#global-monitoring-content .col-md-4:last-child .monitor-item {
    border-right: none;
}

.monitor-label {
    font-size: 14px;  /* 0.9rem -> 14px */
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px; /* 0.5rem -> 8px */
}

.monitor-value {
    font-size: 18px; /* 1.1rem -> 18px */
    font-weight: 500;
    color: #343a40;
}

.monitor-value .badge-modern {
    font-size: 16px; /* 1rem -> 16px */
    padding: 0.5em 0.8em;
}

.monitor-value a {
    font-weight: 500;
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.monitor-value a:hover {
    color: #434190;
}

.monitor-value small {
    font-size: 14px; /* 0.9rem -> 14px */
}

.progress {
    height: 10px;
}

.monitor-label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.monitor-value {
    font-size: 16px;
    color: #343a40;
}

.monitor-value span {
    display: inline-block;
}

#global-monitoring-chevron {
    transition: transform 0.2s ease;
}


/* AdminLTE Small Box Styles */
.small-box {
    border-radius: 12px;
    position: relative;
    display: block;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.small-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.small-box > .inner {
    padding: 15px 20px;
    position: relative;
    z-index: 2;
}

.small-box .inner h3 {
    font-size: 32px;
    font-weight: bold;
    margin: 0 0 5px 0;
    white-space: nowrap;
    padding: 0;
}

.small-box .inner p {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    opacity: 0.9;
}

.small-box .icon {
    position: absolute;
    top: auto;
    bottom: 10px;
    right: 15px;
    z-index: 1;
    font-size: 60px;
    opacity: 0.2;
}

.small-box .icon i {
    color: inherit;
}

.small-box.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.small-box.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: white;
}

.small-box.bg-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.small-box.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.small-box.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
}

.small-box.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
    color: white;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
    padding: 20px 25px;
    border: none;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header .card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.card-header .card-tools .btn {
    margin-left: 10px;
}

.card-body {
    padding: 25px;
}

/* Table Styles */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.badge {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}

.btn-group-sm > .btn, .btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 8px;
}

