/* =========================================================
   FEZEKA SSO — Cards
   Shared card system: glass/dashboard/feature cards, the
   launch-card grid (Home + My Applications), form cards and
   the status pills. Loaded by content pages via PageCss.
   ========================================================= */

/* =========================================================
   CARD PRIMITIVES
   ========================================================= */

.glass-card,
.dashboard-card,
.app-card,
.form-card,
.feature-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.glass-card {
    padding: 2rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .03);
    transition: all .25s cubic-bezier(.4, 0, .2, 1);
    border: 1px solid var(--border-light);
}

    .glass-card:hover {
        border-color: rgba(148, 53, 111, .2);
        box-shadow: 0 0 0 1px rgba(148, 53, 111, .1), 0 8px 24px rgba(0, 0, 0, .06), 0 24px 48px rgba(148, 53, 111, .04);
        transform: translateY(-4px);
    }

.dashboard-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all .2s ease;
}

    .dashboard-card:hover {
        border-color: var(--primary);
        box-shadow: 0 8px 24px rgba(148, 53, 111, .12);
        transform: translateY(-4px);
    }

    .dashboard-card h3 {
        margin-bottom: .75rem;
        font-size: 1.3rem;
    }

    .dashboard-card p {
        flex-grow: 1;
        margin-bottom: 1.5rem;
        font-size: .95rem;
    }

.card-icon {
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.card-btn {
    display: inline-block;
    padding: .7rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-soft);
    text-align: center;
    transition: all .2s ease;
}

    .feature-card:hover {
        border-color: var(--secondary);
        box-shadow: var(--shadow-lg);
        transform: translateY(-6px);
    }

.feature-icon {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 3rem;
}

.feature-card h3 {
    margin-bottom: .75rem;
}

/* =========================================================
   STATUS PILLS
   ========================================================= */

.app-status {
    padding: .4rem .8rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
}

    .app-status.active {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .app-status.inactive {
        background: #ffebee;
        color: #c62828;
    }

    .app-status.disabled {
        background: #eef1f5;
        color: #6b7280;
    }

/* =========================================================
   LAUNCH CARDS
   ========================================================= */

.launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.launch-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    transition: all .2s ease;
    animation: cardIn .4s ease both;
    animation-delay: var(--delay, 0ms);
    border: 1px solid var(--border-light);
    min-height: 160px;
}

    .launch-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
        border-color: var(--border);
    }

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

    .launch-card:hover {
        transform: translateY(-4px);
        border-color: rgba(148, 53, 111, .4);
        box-shadow: 0 12px 30px rgba(87, 31, 66, .12);
    }

.launch-card-link {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: inherit;
    text-decoration: none;
    flex: 1;
}

    .launch-card-link:hover {
        color: inherit;
        text-decoration: none;
    }

.launch-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: transform .2s ease;
}

.launch-icon-branded {
    overflow: hidden;
    border: 1px solid rgba(148, 53, 111, .14);
    background: linear-gradient(145deg, #fff, #f8f5f7);
    box-shadow: 0 5px 16px rgba(87, 31, 66, .1);
}

.launch-icon-branded img {
    width: 100%;
    height: 100%;
    padding: 6px;
    object-fit: contain;
}

    .launch-icon svg {
        width: 22px;
        height: 22px;
    }

    .launch-card:hover .launch-icon {
        transform: scale(1.06) rotate(-2deg);
    }

.launch-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .launch-info strong {
        color: var(--text);
        font-size: 15px;
        font-weight: 600;
        letter-spacing: -.01em;
        line-height: 1.3;
    }

.launch-desc {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.launch-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 12px;
}

.launch-card-footer .app-status {
    margin-right: auto;
    padding: .3rem .7rem;
    font-size: .78rem;
}

.launch-go {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(0, 0, 0, .04);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all .2s ease;
    border: 1px solid rgba(0, 0, 0, .06);
}

.launch-go::before {
    position: absolute;
    right: 44px;
    width: max-content;
    content: "Open app";
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateX(5px);
    transition: opacity .2s ease, transform .2s ease;
}

.launch-card:hover .launch-go::before {
    opacity: 1;
    transform: translateX(0);
}

    .launch-go svg {
        width: 16px;
        height: 16px;
        transition: transform .2s ease;
    }

    .launch-card:hover .launch-go {
        background: var(--primary);
        color: var(--white);
        border-color: var(--primary);
    }

        .launch-card:hover .launch-go svg {
            transform: translateX(2px);
        }

.launch-tint-0 { background: linear-gradient(135deg, #4f6ae0, #7d8fe8); }
.launch-tint-1 { background: linear-gradient(135deg, #0f8d94, #2bb4bf); }
.launch-tint-2 { background: linear-gradient(135deg, #7b61d1, #a08be8); }
.launch-tint-3 { background: linear-gradient(135deg, #e07b2e, #f3a05c); }
.launch-tint-4 { background: linear-gradient(135deg, #94356f, #b85a8f); }
.launch-tint-5 { background: linear-gradient(135deg, #dd4b3e, #ef6f64); }
.launch-tint-6 { background: linear-gradient(135deg, #a55bd1, #c78fe8); }
.launch-tint-7 { background: linear-gradient(135deg, #1289b0, #3eaeda); }

.launch-empty {
    grid-column: 1 / -1;
    padding: 40px;
    border: 1.5px dashed var(--border);
    border-radius: 14px;
    background: var(--white);
    text-align: center;
}

    .launch-empty .empty-icon {
        width: 64px;
        height: 64px;
        display: grid;
        place-items: center;
        margin: 0 auto 12px;
        border-radius: 16px;
        background: var(--bg-soft);
        color: var(--primary);
    }

    .launch-empty h3 {
        margin-bottom: 6px;
    }

    .launch-empty p {
        color: var(--text-light);
        font-size: 13.5px;
        margin-bottom: 16px;
    }

.launch-grid .launch-empty {
    grid-column: 1 / -1;
}

/* =========================================================
   RESPONSIVE — CARDS
   ========================================================= */

@media (max-width: 768px) {
    .form-card form,
    .form-card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .launch-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1400px) {
    .launch-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }

    .launch-card {
        padding: 24px;
    }

    .launch-icon {
        width: 52px;
        height: 52px;
    }

        .launch-icon svg {
            width: 24px;
            height: 24px;
        }

    .launch-info strong {
        font-size: 16px;
    }

    .launch-desc {
        font-size: 13px;
    }
}

@media (min-width: 1600px) {
    .launch-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 28px;
    }

    .launch-card {
        padding: 28px;
        gap: 18px;
    }

    .launch-icon {
        width: 56px;
        height: 56px;
    }

        .launch-icon svg {
            width: 26px;
            height: 26px;
        }

    .launch-info strong {
        font-size: 17px;
    }

    .launch-desc {
        font-size: 14px;
    }
}

@media (min-width: 1920px) {
    .launch-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 32px;
    }

    .launch-card {
        padding: 32px;
        gap: 20px;
    }

    .launch-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

        .launch-icon svg {
            width: 28px;
            height: 28px;
        }

    .launch-info strong {
        font-size: 18px;
    }

    .launch-desc {
        font-size: 14.5px;
    }

    .form-card form,
    .form-card-body {
        padding: 2.5rem;
    }

    .form-header {
        padding: 2.5rem;
    }
}

@media (min-width: 2560px) {
    .launch-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 28px;
    }

    .launch-card {
        padding: 28px;
        gap: 20px;
        border-radius: 16px;
    }

    .launch-icon {
        width: 64px;
        height: 64px;
        font-size: 28px;
        border-radius: 16px;
    }

        .launch-icon svg {
            width: 28px;
            height: 28px;
        }

    .launch-info strong {
        font-size: 17px;
    }

    .launch-desc {
        font-size: 14px;
    }

    .launch-go {
        width: 40px;
        height: 40px;
        font-size: 17px;
    }

    .form-card form,
    .form-card-body {
        padding: 3rem;
    }

    .form-header {
        padding: 3rem;
    }
}
