/* addons-catalog.html — page-specific styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

.app-container { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    overflow-y: auto;
    flex-shrink: 0;
}
.sidebar.collapsed { width: 80px; }
.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}
.logo {
    display: flex; align-items: center;
    font-size: 20px; font-weight: 600;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo img { height: 32px; }
.header-buttons { margin-top: 16px; }
.header-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: #8c99a8; cursor: pointer;
    font-size: 13px; font-weight: 500;
    transition: all 0.3s ease; width: 100%;
}
.header-btn:hover {
    background: rgba(43,139,230,0.2);
    border-color: #2b8be6; color: #2b8be6;
}
.header-btn .material-icons { font-size: 18px; }

.nav-item {
    display: flex; align-items: center;
    padding: 12px 24px; cursor: pointer;
    transition: all 0.3s ease;
    border: none; background: none; color: white;
    width: 100%; text-align: left;
    border-radius: 0 25px 25px 0;
    margin: 4px 0; font-family: 'Inter', sans-serif; font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,0.1); transform: translateX(5px); }
.nav-item.section-header {
    background: rgba(43,139,230,0.2);
    border-left: 4px solid #2b8be6;
    color: #2b8be6; font-weight: 600;
    margin: 8px 0 4px 0;
    box-shadow: 0 4px 15px rgba(43,139,230,0.2);
}
.nav-item.active-page {
    background: linear-gradient(135deg,rgba(43,139,230,0.3),rgba(84,104,242,0.3));
    border-left: 4px solid #5468f2;
    color: white; font-weight: 500;
    box-shadow: 0 4px 20px rgba(84,104,242,0.3);
}
.nav-item .material-icons { margin-right: 12px; font-size: 20px; flex-shrink: 0; }
.sidebar.collapsed .nav-text { display: none; }
.nav-text { flex: 1; white-space: nowrap; overflow: hidden; }
.expand-icon { margin-left: auto; transition: transform 0.3s ease; font-size: 18px; flex-shrink: 0; }
.nav-item.section-header.expanded .expand-icon { transform: rotate(90deg); }
.nav-item.section-header.expanded { background: #26303f; }
.nav-subitems {
    max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
    background: #26303f; backdrop-filter: blur(10px);
}
.nav-subitems.expanded { max-height: 1000px; }
.nav-subitems .nav-item { background: transparent; padding-left: 52px; font-weight: 400; margin: 2px 0; }
.nav-subitems .nav-item:hover { background: rgba(255,255,255,0.1); transform: translateX(8px); }

/* ===== MAIN CONTENT ===== */
.main-content { flex: 1; display: flex; flex-direction: column; background: rgba(255,255,255,0.02); overflow-y: auto; }

.header {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 16px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: space-between;
}
.header-left { display: flex; align-items: center; }
.header-title {
    font-size: 28px; font-weight: 700; margin-left: 20px;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-right { display: flex; align-items: center; gap: 16px; }
.header-icon-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 10px; color: #8c99a8; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.header-icon-btn:hover { background: rgba(43,139,230,0.2); color: #2b8be6; border-color: #2b8be6; }
.user-badge {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px 8px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 25px; cursor: pointer;
    transition: all 0.3s ease;
}
.user-badge:hover { background: rgba(43,139,230,0.15); }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg,#2b8be6,#5468f2);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: white;
}
.user-name { font-size: 13px; font-weight: 500; color: #c9d2dc; }

/* ===== STATUS INDICATOR ===== */
.status-indicator {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg,rgba(16,185,129,0.2),rgba(5,150,105,0.2));
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 25px;
    font-size: 13px; color: #10b981; font-weight: 500;
}
.status-dot {
    width: 8px; height: 8px; background: #10b981; border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* ===== CONTENT AREA ===== */
.content { padding: 0 32px 32px; flex: 1; }

/* ===== CATALOG TITLE BAR ===== */
.dash-title-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 32px;
}
.dash-title {
    font-size: 26px; font-weight: 700;
    background: linear-gradient(135deg,#ff6b00,#ff9933);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.dash-actions { display: flex; gap: 10px; align-items: center; }
.dash-action-btn {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(255,107,0,0.12);
    border: 1px solid rgba(255,107,0,0.25);
    color: #ff6b00; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
}
.dash-action-btn:hover {
    background: rgba(255,107,0,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,0,0.2);
}
.dash-action-btn .material-icons { font-size: 20px; }

/* ===== DEPLOYMENT SUMMARY BAR ===== */
.deployment-bar {
    display: flex; align-items: center; gap: 24px;
    padding: 16px 24px;
    margin: 0 32px 24px;
    background: rgba(255,107,0,0.08);
    border: 1px solid rgba(255,107,0,0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}
.deployment-stat {
    display: flex; flex-direction: column; align-items: center;
}
.deployment-stat-value {
    font-size: 28px; font-weight: 800;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.deployment-stat-label {
    font-size: 11px; font-weight: 600; color: #838f9f;
    text-transform: uppercase; letter-spacing: 1px;
}
.deployment-divider { width: 1px; height: 40px; background: rgba(255,255,255,0.1); }
.deploy-btn {
    margin-left: auto;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    border: none; border-radius: 12px;
    color: white; font-weight: 700; font-size: 14px;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 15px rgba(255,107,0,0.35);
    font-family: 'Inter', sans-serif;
}
.deploy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,0,0.5);
}
.deploy-btn .material-icons { font-size: 18px; }

/* ===== FILTER TABS ===== */
.filter-tabs {
    display: flex; gap: 8px; padding: 0 32px; margin-bottom: 24px; flex-wrap: wrap;
}
.filter-tab {
    padding: 8px 18px; border-radius: 25px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #8c99a8; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}
.filter-tab:hover {
    background: rgba(43,139,230,0.15);
    border-color: rgba(43,139,230,0.3);
    color: #2b8be6;
}
.filter-tab.active {
    background: linear-gradient(135deg, rgba(43,139,230,0.25), rgba(84,104,242,0.25));
    border-color: #2b8be6;
    color: white;
    box-shadow: 0 4px 15px rgba(43,139,230,0.2);
}

/* ===== CATALOG GRID ===== */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0;
}

/* ===== ADDON CARD ===== */
.addon-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
}
.addon-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.2);
}
.addon-card.selected {
    border-color: rgba(16,185,129,0.6);
    box-shadow: 0 8px 32px rgba(16,185,129,0.15), 0 0 0 1px rgba(16,185,129,0.3);
}
.addon-card.selected .addon-check {
    opacity: 1; transform: scale(1);
}
.addon-card.core {
    border-color: rgba(255,107,0,0.3);
}
.addon-card.core .addon-badge { background: linear-gradient(135deg,#ff6b00,#ff9933); }

/* Check indicator */
.addon-check {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg,#10b981,#059669);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.5);
    transition: all 0.3s ease;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
}
.addon-check .material-icons { font-size: 18px; color: white; }

/* Card header stripe */
.addon-stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--stripe-from, #2b8be6), var(--stripe-to, #5468f2));
}

.addon-body { padding: 24px; }

.addon-top-row {
    display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px;
}
.addon-icon-wrap {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    background: var(--icon-bg, rgba(43,139,230,0.15));
    border: 1px solid var(--icon-border, rgba(43,139,230,0.25));
}
.addon-icon-wrap .material-icons {
    font-size: 26px;
    color: var(--icon-color, #2b8be6);
}

.addon-meta { flex: 1; min-width: 0; }
.addon-name {
    font-size: 16px; font-weight: 700; color: #f2f5f9;
    margin-bottom: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.addon-badge {
    display: inline-block;
    padding: 2px 10px; border-radius: 20px;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: white;
    background: linear-gradient(135deg,#2b8be6,#5468f2);
}
.addon-desc {
    font-size: 13px; color: #8c99a8; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

/* Tags */
.addon-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.addon-tag {
    padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #838f9f;
}

/* Card footer */
.addon-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.addon-toggle-wrap { display: flex; align-items: center; gap: 10px; }
.addon-toggle-label {
    font-size: 12px; font-weight: 600; color: #838f9f;
    transition: color 0.3s;
}
.addon-card.selected .addon-toggle-label { color: #10b981; }

/* Toggle switch */
.toggle-switch {
    position: relative; width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.12);
    border-radius: 24px;
    transition: all 0.3s ease;
}
.toggle-slider::before {
    content: '';
    position: absolute; width: 18px; height: 18px;
    left: 3px; bottom: 3px;
    background: #4b5562;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg,#10b981,#059669);
    box-shadow: 0 0 12px rgba(16,185,129,0.3);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: #171e27;
}

.addon-info-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 6px;
    color: #838f9f; cursor: pointer;
    transition: all 0.3s ease;
    display: flex; align-items: center; justify-content: center;
}
.addon-info-btn:hover {
    background: rgba(43,139,230,0.15);
    color: #2b8be6; border-color: rgba(43,139,230,0.3);
}
.addon-info-btn .material-icons { font-size: 18px; }

/* ===== CORE LOCK ICON ===== */
.core-lock {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg,#ff6b00,#ff9933);
    display: flex; align-items: center; justify-content: center;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(255,107,0,0.4);
}
.core-lock .material-icons { font-size: 16px; color: white; }

/* ===== SECTION DIVIDER ===== */
.catalog-section-title {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    color: #a1aab6; margin: 32px 0 16px;
    display: flex; align-items: center; gap: 12px;
}
.catalog-section-title::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), transparent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.addon-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.addon-card:nth-child(1) { animation-delay: 0.05s; }
.addon-card:nth-child(2) { animation-delay: 0.1s; }
.addon-card:nth-child(3) { animation-delay: 0.15s; }
.addon-card:nth-child(4) { animation-delay: 0.2s; }
.addon-card:nth-child(5) { animation-delay: 0.25s; }
.addon-card:nth-child(6) { animation-delay: 0.3s; }
.addon-card:nth-child(7) { animation-delay: 0.35s; }
.addon-card:nth-child(8) { animation-delay: 0.4s; }
.addon-card:nth-child(9) { animation-delay: 0.45s; }
.addon-card:nth-child(10) { animation-delay: 0.5s; }
.addon-card:nth-child(11) { animation-delay: 0.55s; }
.addon-card:nth-child(12) { animation-delay: 0.6s; }
.addon-card:nth-child(13) { animation-delay: 0.65s; }
.addon-card:nth-child(14) { animation-delay: 0.7s; }
.addon-card:nth-child(15) { animation-delay: 0.75s; }
.addon-card:nth-child(16) { animation-delay: 0.8s; }
.addon-card:nth-child(17) { animation-delay: 0.85s; }
.addon-card:nth-child(18) { animation-delay: 0.9s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1400px) { .catalog-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 1000px) {
    .catalog-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .deployment-bar { flex-wrap: wrap; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ===== DETAIL MODAL ===== */
.detail-overlay {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: center; justify-content: center;
}
.detail-overlay.active { display: flex; }
.detail-modal {
    width: 560px; max-height: 80vh;
    background: linear-gradient(135deg, #1f2937, #232e3d);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.detail-modal-header {
    padding: 24px 28px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.detail-modal-header h2 {
    font-size: 20px; font-weight: 700; color: #f2f5f9;
}
.detail-close {
    background: rgba(255,255,255,0.06); border: none;
    border-radius: 8px; padding: 6px; color: #8c99a8; cursor: pointer;
    transition: all 0.2s;
}
.detail-close:hover { background: rgba(255,255,255,0.12); color: #f2f5f9; }
.detail-close .material-icons { font-size: 20px; }
.detail-modal-body {
    padding: 28px; overflow-y: auto; max-height: calc(80vh - 80px);
}
.detail-section { margin-bottom: 20px; }
.detail-section h4 {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    color: #838f9f; margin-bottom: 8px;
}
.detail-section p { font-size: 14px; color: #8c99a8; line-height: 1.7; }
.detail-features { list-style: none; }
.detail-features li {
    font-size: 13px; color: #8c99a8; padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    display: flex; align-items: center; gap: 8px;
}
.detail-features li .material-icons { font-size: 16px; color: #10b981; }

/* ===== TOAST ===== */
.toast {
    position: fixed; bottom: 32px; right: 32px;
    padding: 14px 24px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 14px;
    color: #10b981; font-weight: 600; font-size: 14px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(20px);
    z-index: 10000;
    transform: translateY(80px); opacity: 0;
    transition: all 0.4s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .material-icons { font-size: 20px; }
