/* ==========================================================================
   RUMREN ID - SERVICES HUB COMPACT & UNIFORM LAYOUT
   ========================================================================== */
.services-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 16px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Jarak vertikal seragam antar baris section */
}

/* 1. SLIM HERO BANNER */
.services-hero-slim {
    width: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 65%, #312e81 100%);
    border: 1px solid #334155;
    border-radius: 7px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.services-hero-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.services-badge-capsule {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    background: rgba(169, 68, 56, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    line-height: 1;
}

.services-badge-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 1.5px rgba(239, 68, 68, 0.35);
    display: inline-block;
    flex-shrink: 0;
}

.services-hero-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.2px;
    line-height: 1.25;
}

.services-hero-subtitle {
    font-size: 0.68rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.35;
}

.services-hero-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-shrink: 0;
    font-size: 0.64rem;
    font-weight: 600;
    color: #94a3b8;
}

.services-hero-right::-webkit-scrollbar {
    display: none;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1;
    font-size: 0.64rem;
    flex-shrink: 0;
}

.hero-chip svg {
    width: 12px;
    height: 12px;
    color: #38bdf8;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    position: relative;
    top: 1.5px;
}

.hero-chip-sep {
    color: #475569;
    font-size: 0.55rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
    position: relative;
    top: 0.5px;
}

/* 2. ULTRA-SLIM TOOLBAR */
.services-toolbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    box-sizing: border-box;
}

.services-toolbar-left {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.services-toolbar-icon {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.services-toolbar-icon svg {
    width: 13px;
    height: 13px;
}

.services-toolbar-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.15;
}

.services-toolbar-title-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

.services-toolbar-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.2px;
}

.services-toolbar-count {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
}

.services-toolbar-subtitle {
    font-size: 0.6rem;
    font-weight: 600;
    color: #64748b;
}

.services-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.services-search-box {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    height: 26px;
    padding: 0 7px;
    gap: 5px;
    width: 190px;
    transition: all 0.15s ease;
}

.services-search-box:focus-within {
    background: #ffffff;
    border-color: #a94438;
    box-shadow: 0 0 0 2px rgba(169, 68, 56, 0.15);
    width: 220px;
}

.services-search-box svg {
    width: 12px;
    height: 12px;
    color: #64748b;
    flex-shrink: 0;
}

.services-search-box input {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.68rem;
    color: #0f172a;
    outline: none;
    width: 100%;
    padding: 0;
}

.services-search-box input::placeholder {
    color: #94a3b8;
}

.services-search-box button {
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
}

.services-category-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 1px 0;
}

.services-category-tabs::-webkit-scrollbar {
    display: none;
}

.hub-tab-btn {
    height: 26px;
    padding: 0 8px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.64rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.hub-tab-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.hub-tab-btn.active {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
    font-weight: 700;
}

/* 3. UNIFORM COMPACT CARDS GRID (PANDING SERAGAM & MINIM) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 8px;
    /* SERAGAM DAN MINIM DI ATAS, BAWAH, KIRI, KANAN */
    width: 100%;
    box-sizing: border-box;
}

.service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 9px 11px;
    /* PADDING INTERIOR SERAGAM & MINIM */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.15s ease;
    box-sizing: border-box;
    position: relative;
}

.service-card.is-active {
    cursor: pointer;
}

.service-card.is-active:hover {
    border-color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.07);
}

.service-card.is-soon {
    opacity: 0.72;
    background: #f8fafc;
}

/* Card Header */
.service-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.service-card-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    border-radius: 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-sizing: border-box;
}

.service-card-logo img {
    width: 100%;
    height: 100%;
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    display: block;
}

.service-letter-badge {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.service-card-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.service-card-domain {
    font-size: 0.64rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.service-card-status {
    flex-shrink: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 3.5px;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.status-pill.active {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.status-pill.active .pulse-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #10b981;
}

.status-pill.soon {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.status-pill.soon svg {
    width: 9px;
    height: 9px;
}

/* Card Body */
.service-card-desc {
    font-size: 0.68rem;
    line-height: 1.35;
    color: #64748b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 28px;
}

/* Card Foot */
.service-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding-top: 5px;
    border-top: 1px solid #f1f5f9;
}

.service-platforms {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 2.5px;
    font-size: 0.58rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.platform-chip svg {
    width: 10px;
    height: 10px;
    color: #475569;
}

.service-action {
    flex-shrink: 0;
}

.btn-service-open {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    height: 24px;
    border-radius: 4px;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-service-open:hover {
    background: #b91c1c;
}

.btn-service-open svg {
    width: 11px;
    height: 11px;
}

.btn-service-disabled {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    cursor: not-allowed;
    user-select: none;
}

/* SSO Card in Grid */
.service-card.sso-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

.service-card.sso-card:hover {
    border-color: #a94438;
}

.service-card.sso-card .service-card-title {
    color: #ffffff !important;
}

.service-card.sso-card .service-card-domain {
    color: #f2c7c2 !important;
}

.service-card.sso-card .service-card-desc {
    color: #cbd5e1 !important;
}

.sso-logo {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.3);
    color: #f87171;
}

.sso-logo svg {
    width: 16px;
    height: 16px;
}

.status-pill.sso-pill {
    background: #fdf5f4;
    border: 1px solid #f2c7c2;
    color: #8c352a;
}

.sso-foot {
    border-top-color: #334155;
}

.platform-chip.sso-chip {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.platform-chip.sso-chip svg {
    color: #a94438;
}

.btn-service-sso {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-service-sso:hover {
    background: rgba(255, 255, 255, 0.22);
}

.btn-service-sso svg {
    width: 11px;
    height: 11px;
}

/* EMPTY STATE */
.services-empty-state {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    padding: 24px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.empty-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.empty-icon-wrap svg {
    width: 18px;
    height: 18px;
}

.empty-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.empty-text {
    font-size: 0.68rem;
    color: #64748b;
    margin: 0;
    max-width: 300px;
}

.empty-reset-btn {
    padding: 4px 12px;
    border-radius: 4px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-top: 4px;
}

.empty-reset-btn:hover {
    background: #334155;
}

/* MOBILE RESPONSIVE OPTIMIZATION */
@media (max-width: 680px) {
    .services-wrapper {
        padding: 8px 10px 16px !important;
        gap: 6px !important;
    }

    .services-hero-slim {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 8px 10px;
    }

    .services-hero-right {
        width: 100%;
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.15);
        padding-top: 5px;
        padding-bottom: 2px;
        font-size: 0.64rem;
        gap: 6px;
    }

    .services-hero-right::-webkit-scrollbar {
        display: none !important;
    }

    .services-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 6px 8px;
    }

    .services-toolbar-right {
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }

    .services-search-box {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .services-search-box:focus-within {
        width: auto !important;
    }

    .services-category-tabs {
        flex: 0 0 auto !important;
        max-width: 50% !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        overflow-x: auto !important;
    }

    .services-grid {
        grid-template-columns: 100% !important;
        gap: 6px !important;
        /* Uniform dan rapat di mobile */
    }

    .service-card {
        padding: 8px 10px !important;
    }
}