/* =========================================== */
/* ОСНОВНЫЕ СТИЛИ */
/* =========================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --card-bg: white;
    --online: #10b981;
    --offline: #94a3b8;
    --gold: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================== */
/* НАВИГАЦИЯ */
/* =========================================== */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.user-balance {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #0f172a20, #1e293b20);
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.balance-amount {
    font-weight: 700;
    color: var(--primary);
    font-size: 18px;
}

.btn-balance {
    background: var(--primary);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-balance:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.logout-btn {
    padding: 8px 16px;
    background: var(--danger);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.logout-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* =========================================== */
/* ВЫБОР ПЛАТЫ */
/* =========================================== */
.board-selector {
    margin: 30px 0 20px;
}

.board-selector-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-cards {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.board-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    flex: 1;
    min-width: 280px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.board-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.board-card.recommended {
    border-color: var(--gold);
    background: linear-gradient(135deg, #fef9e7, white);
}

.board-card.recommended::before {
    content: '🔥 Хит';
    position: absolute;
    top: 12px;
    right: -30px;
    background: var(--gold);
    color: #92400e;
    padding: 4px 30px;
    font-size: 12px;
    font-weight: 600;
    transform: rotate(45deg);
}

.board-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.board-card-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.board-card-badge {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}
.in-stock {
    background: #10b981;
    color: white;
}

.out-of-stock {
    background: #64748b;
    color: white;
}

.board-card-specs {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.spec-label {
    color: var(--gray);
}

.spec-value {
    font-weight: 600;
    color: var(--dark);
}

.board-card-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 15px 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-period {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
}

.board-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-buy-small {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-buy-small:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* =========================================== */
/* СЕТКА ДАШБОРДА */
/* =========================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin: 30px 0;
}

/* =========================================== */
/* КАРТОЧКИ */
/* =========================================== */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================== */
/* УСТРОЙСТВА */
/* =========================================== */
.devices-grid {
    display: grid;
    gap: 20px;
}

.device-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.device-card:hover {
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.device-card.online {
    border-left: 4px solid var(--online);
}

.device-card.offline {
    border-left: 4px solid var(--offline);
    opacity: 0.8;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.device-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.device-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.status-online {
    background: #10b98120;
    color: #10b981;
}

.status-offline {
    background: #94a3b820;
    color: #64748b;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.status-dot.offline {
    background: #94a3b8;
}

.device-id {
    font-size: 12px;
    color: #64748b;
    font-family: monospace;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.device-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.module-tag {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    color: #475569;
    border: 1px solid var(--border);
}

.device-services {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.service-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-name {
    font-weight: 500;
    color: var(--dark);
}

.service-cost {
    font-weight: 600;
    color: var(--primary);
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.service-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #dcfce7;
    color: #166534;
}

.service-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.total-cost {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
}

.device-footer {
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: 5px;
}

.device-date {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.device-actions {
    display: flex;
    gap: 8px;
}

.btn-module {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.btn-module.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-module.primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-module.outline {
    background: white;
    border: 1px solid var(--border);
    color: #475569;
}

.btn-module.outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* =========================================== */
/* ПРАВАЯ КОЛОНКА */
/* =========================================== */
.info-grid {
    display: grid;
    gap: 20px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    width: 100px;
    color: var(--gray);
    font-size: 14px;
}

.info-value {
    color: var(--dark);
    font-weight: 500;
    flex: 1;
}

.payments-list {
    max-height: 300px;
    overflow-y: auto;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.payment-item:hover {
    background: #f8fafc;
}

.payment-amount {
    font-weight: 700;
    font-size: 16px;
}

.payment-amount.positive {
    color: var(--secondary);
}

.payment-amount.negative {
    color: var(--danger);
}

.payment-reason {
    font-size: 13px;
    color: #475569;
    margin-top: 2px;
}

.payment-date {
    font-size: 12px;
    color: #94a3b8;
}

/* =========================================== */
/* БЕЙДЖИ */
/* =========================================== */
.badge {
    background: #3b82f6;
    color: white;
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 500;
}

/* =========================================== */
/* МОДАЛЬНЫЕ ОКНА */
/* =========================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* =========================================== */
/* КНОПКИ */
/* =========================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--dark);
}

.btn-outline:hover {
    background: var(--light);
}

/* =========================================== */
/* КАТАЛОГ МОДУЛЕЙ */
/* =========================================== */
.modules-catalog {
    background: #0f172a;
    border: 1px solid #3b82f6;
    border-radius: 20px;
    margin: 30px 0;
    overflow: visible;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    border-radius: 20px 20px 0 0;
}

.catalog-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-count {
    background: #3b82f6;
    color: white;
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 400;
}

.catalog-toggle-btn {
    background: #334155;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.catalog-toggle-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 20px 24px;
    max-height: none !important;
    overflow: visible !important;
}

.module-catalog-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s;
    text-decoration: none;
    color: white;
    display: flex !important;
    align-items: center;
    gap: 12px;
    opacity: 1 !important;
    visibility: visible !important;
}

.module-catalog-card:hover {
    background: #3b82f6;
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.module-catalog-icon {
    font-size: 24px;
    min-width: 40px;
    text-align: center;
}

.module-catalog-info {
    flex: 1;
    min-width: 0;
}

.module-catalog-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-catalog-desc {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-badge {
    background: #334155;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 9px;
    flex-shrink: 0;
}

/* Скрытие после 12-го элемента */
#modulesGrid .module-catalog-card:nth-child(n+13) {
    display: none !important;
}

#modulesGrid.show-all .module-catalog-card:nth-child(n+13) {
    display: flex !important;
}

/* =========================================== */
/* КАТАЛОГ СИСТЕМ */
/* =========================================== */
.systems-catalog {
    background: #0f172a;
    border: 1px solid #10b981;
    border-radius: 20px;
    margin: 30px 0;
    overflow: visible;
}

.systems-catalog .catalog-count {
    background: #10b981;
}

.systems-catalog .module-catalog-card:hover {
    background: #10b981;
    border-color: #10b981;
}

.systems-catalog .catalog-toggle-btn:hover {
    background: #10b981;
    border-color: #10b981;
}

/* Скрытие после 8-го элемента */
#systemsCatalogGrid .module-catalog-card:nth-child(n+9) {
    display: none !important;
}

#systemsCatalogGrid.show-all .module-catalog-card:nth-child(n+9) {
    display: flex !important;
}

/* =========================================== */
/* КАТАЛОГ AI СИСТЕМ */
/* =========================================== */
.ai-systems-catalog {
    background: #0f172a;
    border: 1px solid #8b5cf6;
    border-radius: 20px;
    margin: 30px 0;
    overflow: visible;
}

.ai-systems-catalog .catalog-count {
    background: #8b5cf6;
}

.ai-systems-catalog .module-catalog-card:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.ai-systems-catalog .catalog-toggle-btn:hover {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

/* =========================================== */
/* ПРОИЗВОДСТВЕННЫЕ ЛИНИИ */
/* =========================================== */
.lines-catalog {
    background: #0f172a;
    border: 1px solid #10b981;
    border-radius: 20px;
    margin: 30px 0;
    overflow: visible;
}

.lines-catalog .catalog-count {
    background: #10b981;
}

.lines-catalog .module-catalog-card:hover {
    background: #10b981;
    border-color: #10b981;
}

/* =========================================== */
/* СИСТЕМЫ ПОЛЬЗОВАТЕЛЯ */
/* =========================================== */
.system-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.system-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    border-color: #3b82f6;
}

.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* =========================================== */
/* CTA СЕКЦИЯ */
/* =========================================== */
.cta-section {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    border-radius: 32px;
    padding: 60px 40px;
    margin: 60px 0;
    text-align: center;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 18px;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.cta-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.cta-step {
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 15px;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn-primary-large {
    background: #3b82f6;
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary-large:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37,99,235,0.3);
}

.btn-secondary-large {
    background: transparent;
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
    display: inline-block;
}

.btn-secondary-large:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

/* =========================================== */
/* АНИМАЦИИ */
/* =========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================== */
/* АДАПТИВНОСТЬ */
/* =========================================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .board-cards {
        flex-direction: column;
    }
    
    .device-actions {
        flex-direction: column;
    }
    
    .btn-module {
        width: 100%;
    }
    
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .catalog-toggle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .module-catalog-name,
    .module-catalog-desc {
        white-space: normal;
    }
    
    .cta-title {
        font-size: 28px;
    }
    
    .cta-text {
        font-size: 16px;
    }
    
    .cta-steps {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
}

.payment-method-card:hover {
    border-color: #2563eb !important;
    background: #f0f9ff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #334155;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-primary {
    background: #2563eb;
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.service-toggle-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.service-toggle-btn.enable {
    background: #10b981;
    color: white;
}

.service-toggle-btn.enable:hover {
    background: #059669;
}

.service-toggle-btn.disable {
    background: #ef4444;
    color: white;
}

.service-toggle-btn.disable:hover {
    background: #dc2626;
}

.service-toggle-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}








/* modules_catalog.blade.php */


  /* ВСЕ СТИЛИ С ПРЕФИКСОМ nm- (nero-modules) */
        .nm-wrapper {
            max-width: 1400px;
            margin: 0 auto;
            padding: 30px 24px;
            font-family: 'Inter', sans-serif;
        }

        .nm-title {
            font-size: 32px;
            font-weight: 700;
            color: #1e293b;
            margin-bottom: 30px;
            text-align: center;
        }

        .nm-category {
            margin: 40px 0;
        }

        .nm-category-header {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 24px;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
        }

        .nm-category-icon {
            font-size: 28px;
        }

        .nm-category-count {
            margin-left: auto;
            background: #f1f5f9;
            padding: 4px 12px;
            border-radius: 30px;
            font-size: 14px;
            font-weight: 500;
            color: #475569;
        }

        .nm-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
        }

        .nm-card {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 16px;
            padding: 20px;
            transition: all 0.2s;
            cursor: pointer;
        }

        .nm-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
            border-color: #2563eb;
        }

        .nm-card-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .nm-card-icon {
            font-size: 32px;
            width: 48px;
            height: 48px;
            background: #f8fafc;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nm-card-name {
            font-size: 18px;
            font-weight: 600;
            color: #1e293b;
            flex: 1;
        }

        .nm-card-interface {
            font-size: 11px;
            color: #2563eb;
            background: #dbeafe;
            padding: 2px 8px;
            border-radius: 30px;
        }

        .nm-card-desc {
            font-size: 14px;
            color: #475569;
            line-height: 1.5;
            margin-bottom: 12px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .nm-card-link {
            display: block;
            text-align: right;
            color: #2563eb;
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
        }

        .nm-card-link:hover {
            text-decoration: underline;
        }

        .nm-filters {
            background: white;
            border-radius: 16px;
            padding: 20px;
            margin-bottom: 30px;
            border: 1px solid #e2e8f0;
        }

        .nm-search {
            width: 100%;
            padding: 12px 20px;
            border: 1px solid #e2e8f0;
            border-radius: 30px;
            font-size: 14px;
            margin-bottom: 15px;
        }

        .nm-tags {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .nm-tag {
            padding: 6px 16px;
            background: #f1f5f9;
            border-radius: 30px;
            font-size: 13px;
            cursor: pointer;
            transition: 0.2s;
            border: 1px solid transparent;
        }

        .nm-tag:hover {
            background: #e2e8f0;
        }

        .nm-tag.active {
            background: #2563eb;
            color: white;
        }

        .nm-clear {
            padding: 6px 20px;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 30px;
            cursor: pointer;
            font-size: 13px;
            margin-left: 10px;
        }

        @media (max-width: 768px) {
            .nm-grid {
                grid-template-columns: 1fr;
            }
            
            .nm-category-header {
                flex-wrap: wrap;
            }
            
            .nm-category-count {
                margin-left: 0;
            }
        }














/* //module_view.blade.php */


                .module-page {
            max-width: 1200px;
            margin: 0 auto;
            padding: 30px 20px;
            font-family: 'Inter', sans-serif;
        }

        .module-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e2e8f0;
        }

        .module-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .module-icon {
            font-size: 48px;
            background: #f1f5f9;
            width: 80px;
            height: 80px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .module-name {
            font-size: 28px;
            font-weight: 700;
            color: #1e293b;
        }

        .back-link {
            color: #2563eb;
            text-decoration: none;
            padding: 8px 20px;
            background: #f1f5f9;
            border-radius: 30px;
            font-size: 14px;
        }

        .back-link:hover {
            background: #e2e8f0;
        }

        /* Основная информация */
        .info-section {
            background: white;
            border-radius: 24px;
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid #e2e8f0;
        }

        .section-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 20px;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .description {
            font-size: 16px;
            line-height: 1.7;
            color: #334155;
            margin-bottom: 25px;
        }

        /* Характеристики */
        .specs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 12px;
            margin-bottom: 25px;
        }

        .spec-item {
            background: #f8fafc;
            padding: 12px 15px;
            border-radius: 12px;
            border: 1px solid #e2e8f0;
        }

        .spec-label {
            font-size: 12px;
            color: #64748b;
            margin-bottom: 4px;
        }

        .spec-value {
            font-weight: 600;
            color: #2563eb;
        }

        /* Интерфейс управления */
        .control-panel {
            background: #f8fafc;
            border-radius: 20px;
            padding: 25px;
            margin: 30px 0;
        }

        .control-row {
            display: flex;
            align-items: center;
            gap: 20px;
            margin-bottom: 15px;
            padding: 12px;
            background: white;
            border-radius: 12px;
        }

        .control-label {
            min-width: 150px;
            font-weight: 600;
            color: #475569;
        }

        .control-value {
            flex: 1;
            font-size: 18px;
            font-weight: 500;
            color: #2563eb;
        }

        .control-buttons {
            display: flex;
            gap: 10px;
        }

        .btn-control {
            background: #2563eb;
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 30px;
            font-size: 13px;
            cursor: pointer;
        }

        .btn-control:hover {
            background: #1d4ed8;
        }

        .btn-control.secondary {
            background: white;
            color: #2563eb;
            border: 1px solid #2563eb;
        }

        .btn-control.secondary:hover {
            background: #eff6ff;
        }

        /* График */
        .chart-container {
            background: white;
            border-radius: 20px;
            padding: 20px;
            margin: 30px 0;
            border: 1px solid #e2e8f0;
            height: 300px;
        }

        /* Примеры применения */
        .examples-list {
            background: #f8fafc;
            border-radius: 16px;
            padding: 20px;
        }

        .example-item {
            padding: 12px;
            border-bottom: 1px solid #e2e8f0;
            font-size: 14px;
            color: #334155;
        }

        .example-item:last-child {
            border-bottom: none;
        }

        .example-item strong {
            color: #2563eb;
        }

        @media (max-width: 768px) {
            .module-header {
                flex-direction: column;
                gap: 15px;
                text-align: center;
            }
            
            .specs-grid {
                grid-template-columns: 1fr;
            }
            
            .control-row {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .control-label {
                min-width: auto;
            }
        }




/* Стили для select (выпадающие списки) */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px !important;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
}

/* Для темного фона (MQTT консоль) */
.bg-dark select {
    background-color: #1e293b;
    border-color: #334155;
    color: white;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
}

/* Для правой колонки MQTT */
.mqtt-console {
    background: #0f172a;
    border-radius: 12px;
    padding: 15px;
    color: white;
}

.mqtt-console pre {
    background: #1e293b;
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
}
/* Стили для MQTT блока */
.mqtt-input {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    width: 100%;
    font-family: monospace;
    font-size: 13px;
}

.mqtt-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

.mqtt-console {
    background: #0f172a;
    border-radius: 12px;
    padding: 15px;
    color: #e2e8f0;
    font-family: monospace;
    font-size: 12px;
    height: 300px;
    overflow-y: auto;
}

.mqtt-console pre {
    background: #1e293b;
    padding: 8px;
    border-radius: 6px;
    margin: 5px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}


/* Общие стили для input */
input[type="text"],
input[type="number"],
select,
textarea {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #1e293b;
    transition: all 0.2s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

/* Для select с стрелкой */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* Для checkbox */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
}

/* Кнопки периода */
.history-period-btn {
    padding: 8px 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.history-period-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.history-period-btn:hover {
    background: #e2e8f0;
}
.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 15px 0;
}

.spec-item {
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spec-label {
    color: #64748b;
    font-size: 13px;
}

.spec-value {
    font-weight: 600;
    color: #1e293b;
}
#specsModal {
    cursor: pointer;
}
#specsModal > div {
    cursor: default;
}
.price-kop {
    font-size: 0.65em;
    vertical-align: super;
    margin-left: 2px;
}

.price-rub {
    font-size: 1em;
    font-weight: 700;
}

/* Системы - светлый стиль */
.system-card-light {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    border: 1px solid #bbf7d0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    color: inherit;
}

.system-card-light:hover {
    border-color: #22c55e;
    box-shadow: 0 8px 20px -8px rgba(34,197,94,0.25);
    transform: translateY(-2px);
}

.system-card-light.highlight {
    border: 2px solid #22c55e;
    box-shadow: 0 8px 20px -8px rgba(34,197,94,0.4);
    position: relative;
}

.system-card-light.highlight::before {
    content: '⭐ Рекомендуем';
    position: absolute;
    top: -10px;
    right: 16px;
    background: #22c55e;
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
}

.system-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 1px solid #bbf7d0;
}

.system-card-name {
    font-weight: 700;
    font-size: 18px;
    color: #166534;
}

.system-card-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
}

.system-card-badge {
    background: #f0fdf4;
    color: #15803d;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
}

/* Сетка систем */
.systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}