/* Services Grid Layout - Dark Theme */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.service-card {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 12px;
    border: 1px solid #334155;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transform: translateY(-2px);
    border-color: #475569;
}

.service-card.inactive {
    opacity: 0.5;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.service-card-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.service-card-title {
    flex: 1;
}

.service-card-title h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #f1f5f9;
}

.service-card-title .category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}

.category-platform { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.category-ai { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.category-business { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.category-infra { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.category-tools { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.category-showcase { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.service-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.service-card-status span:last-child {
    font-size: 12px;
    font-weight: 600;
    color: #4ade80;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.status-dot.running { background: #4ade80; color: #4ade80; }
.status-dot.stopped { background: #f87171; color: #f87171; }
.status-dot.error { background: #fbbf24; color: #fbbf24; }
.status-dot.unknown { background: #64748b; color: #64748b; }

.service-card-body {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.service-card-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.tech-tag {
    background: rgba(99, 102, 241, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.service-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #334155;
}

.revenue-stars {
    color: #fbbf24;
    font-size: 16px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.service-card-meta > div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card-meta > div:first-child span:last-child {
    font-size: 13px;
    font-weight: 600;
    color: #818cf8;
}

.service-card-actions {
    display: flex;
    gap: 8px;
}

.service-card-actions a,
.service-card-actions button {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-home { 
    background: rgba(99, 102, 241, 0.2); 
    color: #a5b4fc; 
    border: 1px solid rgba(99, 102, 241, 0.4);
}
.btn-home:hover { 
    background: rgba(99, 102, 241, 0.3); 
}

.btn-admin { 
    background: rgba(59, 130, 246, 0.2); 
    color: #93c5fd; 
    border: 1px solid rgba(59, 130, 246, 0.4);
}
.btn-admin:hover { 
    background: rgba(59, 130, 246, 0.3); 
}

.btn-detail { 
    background: linear-gradient(135deg, #6366f1, #8b5cf6); 
    color: #fff; 
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}
.btn-detail:hover { 
    background: linear-gradient(135deg, #818cf8, #a78bfa);
    transform: translateY(-1px);
}

/* Service Detail Modal - Dark Theme */
.service-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.service-modal {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 1px solid #334155;
}

.service-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    z-index: 10;
}

.service-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f1f5f9;
}

.service-modal-close {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 24px;
    cursor: pointer;
    color: #f87171;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.service-modal-body {
    padding: 24px;
}

.service-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.service-info-item {
    background: rgba(30, 41, 59, 0.5);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #334155;
}

.service-info-item label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-info-item .value {
    font-size: 15px;
    color: #e2e8f0;
    font-weight: 600;
    line-height: 1.5;
}

.service-features {
    margin-bottom: 24px;
}

.service-features h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
}

.features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.service-tools {
    margin-bottom: 24px;
}

.service-tools h4 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tools-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 10px;
    border: 1px solid #334155;
}

.tool-type {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-type.api { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.tool-type.admin { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.tool-type.docs { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.tool-type.cli { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.tool-type.db { background: rgba(236, 72, 153, 0.2); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }
.tool-type.log { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.tool-type.script { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.3); }

.tool-info {
    flex: 1;
}

.tool-info .name {
    font-weight: 600;
    font-size: 14px;
    color: #e2e8f0;
}

.tool-info .desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.tool-url {
    font-size: 12px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-url:hover {
    color: #93c5fd;
    text-decoration: underline;
}

code.tool-url {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.service-notes {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 10px;
    padding: 18px;
}

.service-notes h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #fbbf24;
}

.service-notes p {
    margin: 0;
    font-size: 14px;
    color: #fcd34d;
    line-height: 1.6;
    font-weight: 500;
}

/* Modal Footer Buttons */
.service-modal-body > div:last-child .btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.service-modal-body > div:last-child .btn-view {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.4);
}

.service-modal-body > div:last-child .btn-view:hover {
    background: rgba(99, 102, 241, 0.3);
}

.service-modal-body > div:last-child .btn-edit {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.service-modal-body > div:last-child .btn-edit:hover {
    background: rgba(59, 130, 246, 0.3);
}

.service-modal-body > div:last-child .btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.service-modal-body > div:last-child .btn-delete:hover {
    background: rgba(239, 68, 68, 0.3);
}

.service-modal-body > div:last-child .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.service-modal-body > div:last-child .btn-primary:hover {
    background: linear-gradient(135deg, #34d399, #10b981);
}

/* Responsive */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-info-grid {
        grid-template-columns: 1fr;
    }
    
    .service-modal {
        margin: 10px;
        max-height: 95vh;
    }
}
