/* ================================================== */
/* DASHBOARD.CSS — Premium Dashboard & Profile Cards   */
/* ================================================== */

/* ── Dashboard Container ── */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2.5rem 4rem;
    animation: fadeInUp 0.5s var(--ease-out-expo) forwards;
}

/* ── Dashboard Header ── */
.dashboard-header {
    margin-bottom: 2.5rem;
    text-align: left;
}

.dashboard-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.dashboard-title i {
    font-size: 1.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    margin-left: 0.1rem;
}

/* ── Profiles Grid ── */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* ── Profile Card ── */
.profile-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition:
        transform 0.35s var(--ease-out-expo),
        box-shadow 0.35s var(--ease-out-expo),
        border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.4s var(--ease-out-expo) forwards;
}

.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0), rgba(99, 102, 241, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.4s ease;
}

.profile-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(168, 85, 247, 0.25);
}

.profile-card:hover::before {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(59, 130, 246, 0.15));
}

/* ── Card Banner ── */
.profile-card-banner {
    height: 80px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.profile-card-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, var(--glass-bg), transparent);
    pointer-events: none;
}

/* ── Card Avatar ── */
.profile-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: -36px auto 0;
    position: relative;
    z-index: 2;
    padding: 4px;
    background: var(--bg-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.profile-card-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(168, 85, 247, 0.3);
}

/* ── Card Body ── */
.profile-card-body {
    padding: 0.85rem 1.5rem 0.75rem;
    text-align: center;
}

/* ── Card Name ── */
.profile-card-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

/* ── Card Slug ── */
.profile-card-slug {
    font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.profile-card-slug i {
    font-size: 0.65rem;
    opacity: 0.6;
}

/* ── Card Meta ── */
.profile-card-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.72rem;
    color: var(--text-tertiary);
    padding: 0 0.5rem 0.75rem;
}

.profile-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-card-meta span i {
    font-size: 0.7rem;
    opacity: 0.65;
}

/* ── Card Actions ── */
.profile-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

/* ── Action Buttons ── */
.card-action-btn {
    background: var(--glass-bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
}

.card-action-btn:hover {
    transform: translateY(-2px);
}

.card-action-btn:active {
    transform: translateY(0);
}

/* Edit button — wider with text */
.card-action-edit {
    flex: 1;
    justify-content: center;
}

.card-action-edit:hover {
    background: var(--accent-purple-dim);
    border-color: rgba(168, 85, 247, 0.35);
    color: #c084fc;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.15);
}

/* Export button — green tint */
.card-action-export:hover {
    background: var(--accent-green-dim);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

/* Duplicate button — blue tint */
.card-action-duplicate:hover {
    background: var(--accent-blue-dim);
    border-color: rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

/* Delete button — red tint */
.card-action-delete:hover {
    background: var(--accent-red-dim);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

/* ──────────────────────────────────── */
/* CREATE NEW CARD                      */
/* ──────────────────────────────────── */

.profile-card.profile-card-create {
    border: 2px dashed rgba(168, 85, 247, 0.2);
    background: rgba(168, 85, 247, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    transition:
        transform 0.35s var(--ease-out-expo),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.35s ease;
}

.profile-card-create:hover {
    border-color: var(--accent-purple);
    border-style: solid;
    background: rgba(168, 85, 247, 0.06);
    box-shadow: var(--shadow-glow-purple);
}

.create-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.create-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
    box-shadow: var(--shadow-glow-purple);
    transition: transform 0.4s var(--ease-out-back), box-shadow 0.35s ease;
    position: relative;
}

.create-card-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.15;
    filter: blur(10px);
    transition: opacity 0.35s ease;
}

.profile-card-create:hover .create-card-icon {
    transform: scale(1.12);
    box-shadow: var(--shadow-glow-purple-strong);
}

.profile-card-create:hover .create-card-icon::after {
    opacity: 0.3;
}

.create-card-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.create-card-hint {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ── Dashboard Responsive ── */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 2rem 1rem 3rem;
    }

    .dashboard-title {
        font-size: 1.65rem;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        text-align: center;
    }

    .dashboard-title {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 1.5rem 0.75rem 2.5rem;
    }
}
