/* Dashboard — animated quick action cards */

.site-dashboard-actions-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .site-dashboard-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.site-dashboard-action-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: linear-gradient(145deg, rgb(30 41 59 / 0.75), rgb(15 23 42 / 0.92));
    text-decoration: none;
    opacity: 0;
    transform: translateY(14px);
    animation: site-dash-card-in 0.55s ease-out forwards;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.site-dashboard-action-card:hover {
    transform: translateY(-4px);
    border-color: rgb(99 102 241 / 0.45);
    box-shadow:
        0 16px 40px -12px rgb(99 102 241 / 0.35),
        0 0 0 1px rgb(99 102 241 / 0.15);
}

@keyframes site-dash-card-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-dashboard-action-card-glow {
    position: absolute;
    inset: -1px;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgb(99 102 241 / 0.12) 30%,
        rgb(52 211 153 / 0.15) 55%,
        rgb(168 85 247 / 0.12) 80%,
        transparent 100%
    );
    background-size: 220% 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.site-dashboard-action-card:hover .site-dashboard-action-card-glow {
    opacity: 1;
    animation: site-dash-card-shimmer 2.8s ease-in-out infinite;
}

@keyframes site-dash-card-shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.site-dashboard-action-card-orb {
    position: absolute;
    top: -2rem;
    right: -1.5rem;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 9999px;
    background: rgb(99 102 241);
    filter: blur(36px);
    opacity: 0.22;
    pointer-events: none;
    animation: site-dash-card-orb 6s ease-in-out infinite;
}

@keyframes site-dash-card-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, 8px) scale(1.12); }
}

.site-dashboard-action-card-inner {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.15rem;
}

@media (min-width: 640px) {
    .site-dashboard-action-card-inner {
        padding: 1.35rem 1.35rem 1.25rem;
    }
}

.site-dashboard-action-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.85rem;
    font-size: 1.25rem;
    line-height: 1;
    background: linear-gradient(135deg, rgb(99 102 241 / 0.28), rgb(52 211 153 / 0.18));
    border: 1px solid rgb(255 255 255 / 0.08);
    animation: site-dash-card-icon-pulse 3s ease-in-out infinite;
}

@keyframes site-dash-card-icon-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgb(99 102 241 / 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 18px 2px rgb(99 102 241 / 0.15);
    }
}

.site-dashboard-action-card-body {
    min-width: 0;
    flex: 1;
    padding-right: 0.25rem;
}

.site-dashboard-action-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(248 250 252);
    transition: color 0.25s ease;
}

.site-dashboard-action-card:hover .site-dashboard-action-card-title {
    color: rgb(199 210 254);
}

.site-dashboard-action-card-desc {
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: rgb(148 163 184);
}

.site-dashboard-action-card-arrow {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    color: rgb(100 116 139);
    transition: transform 0.3s ease, color 0.3s ease;
}

.site-dashboard-action-card:hover .site-dashboard-action-card-arrow {
    color: rgb(129 140 248);
    transform: translateX(4px);
}

/* Primary variant */
.site-dashboard-action-card-primary {
    border-color: rgb(99 102 241 / 0.35);
    background: linear-gradient(145deg, rgb(49 46 129 / 0.45), rgb(15 23 42 / 0.95));
}

.site-dashboard-action-card-primary .site-dashboard-action-card-orb {
    background: rgb(129 140 248);
    opacity: 0.28;
}

.site-dashboard-action-card-primary .site-dashboard-action-card-icon {
    background: linear-gradient(135deg, rgb(99 102 241 / 0.45), rgb(79 70 229 / 0.35));
}

.site-dashboard-action-card-primary .site-dashboard-action-card-title {
    color: rgb(224 231 255);
}

.site-dashboard-action-card-primary:hover {
    border-color: rgb(129 140 248 / 0.55);
    box-shadow:
        0 16px 40px -10px rgb(99 102 241 / 0.45),
        0 0 0 1px rgb(129 140 248 / 0.2);
}

/* Accent variant */
.site-dashboard-action-card-accent {
    border-color: rgb(245 158 11 / 0.35);
    background: linear-gradient(145deg, rgb(69 26 3 / 0.35), rgb(15 23 42 / 0.95));
}

.site-dashboard-action-card-accent .site-dashboard-action-card-orb {
    background: rgb(245 158 11);
    opacity: 0.22;
}

.site-dashboard-action-card-accent .site-dashboard-action-card-icon {
    background: linear-gradient(135deg, rgb(245 158 11 / 0.35), rgb(217 119 6 / 0.25));
}

.site-dashboard-action-card-accent .site-dashboard-action-card-title {
    color: rgb(254 243 199);
}

.site-dashboard-action-card-accent:hover {
    border-color: rgb(251 191 36 / 0.5);
    box-shadow:
        0 16px 40px -10px rgb(245 158 11 / 0.35),
        0 0 0 1px rgb(251 191 36 / 0.2);
}

.site-dashboard-action-card-accent:hover .site-dashboard-action-card-title {
    color: rgb(253 230 138);
}

.site-dashboard-action-card-accent:hover .site-dashboard-action-card-arrow {
    color: rgb(251 191 36);
}

/* Light theme */
html[data-theme='light'] .site-dashboard-action-card {
    border-color: rgb(226 232 240);
    background: linear-gradient(145deg, rgb(255 255 255), rgb(248 250 252));
    box-shadow: 0 4px 14px -6px rgb(15 23 42 / 0.12);
}

html[data-theme='light'] .site-dashboard-action-card:hover {
    border-color: rgb(165 180 252);
    box-shadow:
        0 16px 32px -12px rgb(99 102 241 / 0.25),
        0 0 0 1px rgb(199 210 254 / 0.5);
}

html[data-theme='light'] .site-dashboard-action-card-title {
    color: rgb(15 23 42);
}

html[data-theme='light'] .site-dashboard-action-card:hover .site-dashboard-action-card-title {
    color: rgb(67 56 202);
}

html[data-theme='light'] .site-dashboard-action-card-desc {
    color: rgb(71 85 105);
}

html[data-theme='light'] .site-dashboard-action-card-icon {
    border-color: rgb(226 232 240);
    background: linear-gradient(135deg, rgb(238 242 255), rgb(224 231 255));
}

html[data-theme='light'] .site-dashboard-action-card-primary {
    border-color: rgb(199 210 254);
    background: linear-gradient(145deg, rgb(238 242 255), rgb(255 255 255));
}

html[data-theme='light'] .site-dashboard-action-card-primary .site-dashboard-action-card-title {
    color: rgb(49 46 129);
}

html[data-theme='light'] .site-dashboard-action-card-accent {
    border-color: rgb(253 230 138);
    background: linear-gradient(145deg, rgb(255 251 235), rgb(255 255 255));
}

html[data-theme='light'] .site-dashboard-action-card-accent .site-dashboard-action-card-title {
    color: rgb(146 64 14);
}

@media (prefers-reduced-motion: reduce) {
    .site-dashboard-action-card,
    .site-dashboard-action-card-glow,
    .site-dashboard-action-card-orb,
    .site-dashboard-action-card-icon {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .site-dashboard-action-card:hover {
        transform: none;
    }
}

/* Grouped app listing section */
.site-dashboard-actions-section {
    border-radius: 1rem;
    border: 1px solid rgb(99 102 241 / 0.28);
    background: linear-gradient(135deg, rgb(30 27 75 / 0.5), rgb(15 23 42 / 0.82));
    padding: 1.25rem 1.25rem 1.35rem;
}

@media (min-width: 640px) {
    .site-dashboard-actions-section {
        padding: 1.35rem 1.5rem 1.5rem;
    }
}

.site-dashboard-actions-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.site-dashboard-actions-section-lead {
    margin: 0.35rem 0 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgb(148 163 184);
    max-width: 42rem;
}

.site-dashboard-actions-section .site-dashboard-actions-grid {
    gap: 0.875rem;
}

@media (min-width: 768px) {
    .site-dashboard-actions-section .site-dashboard-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

html[data-theme='light'] .site-dashboard-actions-section {
    border-color: rgb(199 210 254);
    background: linear-gradient(135deg, rgb(238 242 255), rgb(248 250 252));
}

html[data-theme='light'] .site-dashboard-actions-section-title {
    color: rgb(15 23 42);
}

html[data-theme='light'] .site-dashboard-actions-section-lead {
    color: rgb(71 85 105);
}
