@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap');

:root {
    --primary: #10b981;
    --accent: #10b981;
    --accent-2: #059669;
    --bg: #ffffff;
    --muted: #f3f4f6;
    --white: #111827;
    --radius-xl: 34px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    min-height: 100vh;
    margin: 0;
}

.splash-bg,
.login-bg {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: radial-gradient(circle at top, #f0fdf4, #dcfce7);
}

.app-shell {
    width: min(390px, 100%);
    border-radius: var(--radius-xl);
    padding: 2rem;
    color: var(--white);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
    background: linear-gradient(160deg, #ffffff, #f8fafc);
    border: 1px solid rgba(16, 185, 129, 0.1);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

body.js-enabled .app-shell {
    opacity: 0;
    transform: translateY(28px);
}

body.js-enabled .app-shell.is-visible {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 30px 55px rgba(16, 24, 40, 0.18);
}

body.js-enabled .app-shell.is-leaving {
    opacity: 0;
    transform: translateY(10px);
}

.dashboard-bg {
    background: radial-gradient(circle at top, #f3f4f6, #e0f7ef);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.dashboard-shell {
    width: min(960px, calc(100% - 3rem));
    min-height: 100vh;
    padding: 1.4rem 1.6rem calc(1.2rem + env(safe-area-inset-bottom, 0));
    gap: 1.5rem;
    display: flex;
    flex-direction: column;
}

.dash-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.dash-greeting p {
    margin: 0;
    color: rgba(17, 24, 39, 0.6);
}

.dash-greeting h2 {
    margin: 0.2rem 0;
}

.dash-greeting span {
    font-size: 0.85rem;
    color: rgba(17, 24, 39, 0.55);
}

.bell-btn {
    position: relative;
    border: none;
    background: rgba(16, 185, 129, 0.12);
    padding: 0.6rem 0.9rem;
    border-radius: 18px;
    font-size: 1.2rem;
    cursor: pointer;
}

.bell-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
}

.dash-badge {
    background: linear-gradient(120deg, #34d399, #10b981);
    color: white;
    border-radius: 30px;
    padding: 1.4rem 1.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.badge-copy p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.badge-copy h3 {
    margin: 0.3rem 0;
}

.badge-copy span {
    font-size: 0.85rem;
    opacity: 0.85;
}

.badge-action {
    background: white;
    color: #047857;
    border-radius: 18px;
    padding: 0.75rem 1rem;
    text-decoration: none;
    font-weight: 600;
}

.dash-url {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 26px;
    padding: 1rem 1.4rem;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.dash-url p {
    margin: 0;
    color: rgba(17, 24, 39, 0.6);
    font-size: 0.85rem;
}

.dash-url h3 {
    margin: 0.2rem 0;
    font-size: 1rem;
    color: #047857;
}

.dash-url span {
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.55);
}

.copy-link {
    border: none;
    border-radius: 18px;
    padding: 0.8rem 1.2rem;
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    font-weight: 600;
    cursor: pointer;
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.9rem;
}

.stat-card {
    border-radius: 22px;
    padding: 1.1rem;
    background: var(--muted);
    color: var(--white);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #10b981, #22d3ee);
    color: white;
}

.stat-card p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

.stat-card h3 {
    margin: 0.4rem 0;
}

.stat-card span {
    font-size: 0.75rem;
    opacity: 0.7;
}

.dash-actions,
.dash-updates {
    background: rgba(15, 23, 42, 0.03);
    border-radius: 24px;
    padding: 1.2rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.action-row {
    display: flex;
    gap: 0.7rem;
}

.action-chip {
    flex: 1;
    border: none;
    border-radius: 20px;
    padding: 0.9rem;
    background: white;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    font-weight: 600;
    cursor: pointer;
}

.action-chip span {
    font-size: 1.2rem;
}

.update-card {
    display: flex;
    gap: 0.9rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.update-card:first-of-type {
    border-top: none;
}

.update-badge {
    align-self: flex-start;
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.update-badge.muted {
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.6);
}

.update-card h4 {
    margin: 0;
}

.update-card p,
.update-card span {
    margin: 0.2rem 0 0;
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.55);
}

.dash-bottom-nav {
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0);
    background: white;
    border-radius: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0.6rem;
    gap: 0.4rem;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
    margin-top: auto;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom, 0));
}

.dash-bottom-nav a {
    text-decoration: none;
    color: rgba(15, 23, 42, 0.6);
    padding: 0.7rem 0.5rem;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.dash-bottom-nav a span {
    font-size: 1.2rem;
}

.dash-bottom-nav a.active {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
}

/* SPLASH */
.splash .logo-block {
    text-align: center;
}

.logo-mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffffff;
}

.logo-block h1 {
    margin: 0;
    font-size: 1.8rem;
}

.logo-block p {
    margin: 0.4rem 0 0;
    color: rgba(17, 24, 39, 0.7);
}

.splash-art {
    position: relative;
    height: 190px;
    margin: 2.5rem 0;
}

.orbit {
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px dashed rgba(16, 185, 129, 0.2);
}

.avatar {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--accent), #059669);
    border: 4px solid rgba(16, 185, 129, 0.1);
}

.avatar.hero {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 95px;
    height: 95px;
    border-radius: 32px;
}

.avatar.alt.left {
    top: 10%;
    left: 15%;
}

.avatar.alt.right {
    bottom: 5%;
    right: 12%;
    background: linear-gradient(135deg, var(--accent-2), #047857);
}

.splash-meta {
    text-align: center;
}

.progress-track {
    width: 60%;
    height: 6px;
    margin: 0 auto 0.9rem;
    background: rgba(16, 185, 129, 0.14);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar {
    display: block;
    width: 55%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    animation: pulse 1.2s ease-in-out infinite alternate;
}

.meta-text {
    font-size: 0.85rem;
    color: rgba(17, 24, 39, 0.65);
    margin-bottom: 1.7rem;
}

/* LOGIN */
.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(17, 24, 39, 0.7);
}

.ghost-btn {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
}

.login-hero h2 {
    margin: 2rem 0 0.3rem;
}

.login-hero p {
    margin: 0;
    color: rgba(17, 24, 39, 0.65);
}

.login-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: rgba(17, 24, 39, 0.65);
}

.field input {
    border: none;
    border-radius: 16px;
    padding: 0.95rem 1.1rem;
    background: rgba(16, 185, 129, 0.07);
    color: var(--white);
    font-size: 0.95rem;
}

.field input:focus {
    outline: 2px solid rgba(16, 185, 129, 0.25);
}

.field .ghost-link {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 0.8rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    animation: slideIn 0.2s ease-out;
}

/* Success and Error Message Styles */
.message {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: messageSlideIn 0.3s ease-out;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.message-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    font-size: 1.1rem;
    line-height: 1;
    color: inherit;
}

.message-close:hover {
    opacity: 1;
}

/* Success Message */
.message-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message-success .message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message-success .message-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Error Message */
.message-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message-error .message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message-error .message-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Warning Message */
.message-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.message-warning .message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message-warning .message-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Info Message */
.message-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.message-info .message-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message-info .message-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Message Container */
.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    width: 100%;
}

.message-container .message {
    margin-bottom: 0.75rem;
}

/* Toast Messages */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: toastSlideUp 0.3s ease-out;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.toast-success {
    background: #10b981;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

.toast-warning {
    background: #f59e0b;
    color: white;
}

.toast-info {
    background: #3b82f6;
    color: white;
}

/* Inline Messages for Forms */
.inline-message {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.inline-error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.inline-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Loading States */
.loading-message {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-shell {
        width: 100%;
        padding: 0.75rem 0.5rem calc(0.75rem + env(safe-area-inset-bottom, 0));
    }

    .message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .message {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
    }
}

.primary-btn {
    border: none;
    border-radius: 18px;
    padding: 1rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(17, 24, 39, 0.35);
    font-size: 0.8rem;
}

.divider span {
    flex: 1;
    height: 1px;
    background: rgba(16, 185, 129, 0.1);
}

.social-row {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
}

.social-row button {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: none;
    background: rgba(16, 185, 129, 0.08);
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(17, 24, 39, 0.6);
}

.login-footer a {
    color: var(--accent);
    text-decoration: none;
}

@keyframes pulse {
    to {
        width: 80%;
        height: 80%;
        opacity: 0;
    }
}

/* Profile Page Styles */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    position: relative;
    margin-bottom: 1.5rem;
}

.avatar-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.edit-avatar-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--accent);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.profile-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: var(--white);
}

.profile-title {
    color: var(--accent);
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.profile-bio {
    color: rgba(17, 24, 39, 0.7);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 1.2rem;
    color: var(--white);
}

.stat-item span {
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.6);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-actions button {
    flex: 1;
}

.profile-sections {
    margin-bottom: 2rem;
}

.wins-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.win-card {
    background: rgba(16, 185, 129, 0.05);
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.win-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.win-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--white);
}

.win-card p {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: rgba(17, 24, 39, 0.7);
}

.win-card span {
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.5);
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.03);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.setting-item:hover {
    background: rgba(16, 185, 129, 0.08);
}

.setting-item span:first-child {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.setting-item div {
    flex: 1;
}

.setting-item h4 {
    margin: 0 0 0.2rem 0;
    font-size: 0.9rem;
    color: var(--white);
}

.setting-item p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.6);
}

.arrow {
    color: rgba(17, 24, 39, 0.4);
    font-size: 1.2rem;
}

/* Subscription Level Styles */
.subscription-level {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.level-info h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
    color: var(--white);
}

.level-info span {
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.6);
}

.level-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.level-badge.free {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
}

.upgrade-prompt {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
}

.upgrade-prompt h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--white);
}

.upgrade-prompt p {
    margin: 0 0 1rem 0;
    font-size: 0.8rem;
    color: rgba(17, 24, 39, 0.7);
    line-height: 1.4;
}

.price-tag {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.upgrade-btn {
    width: 100%;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    color: white;
    border: none;
    border-radius: 16px;
    padding: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

/* Portfolio Templates Styles */
.portfolio-templates {
    margin-bottom: 2rem;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.template-card {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.template-preview {
    margin-bottom: 0.8rem;
}

.preview-image {
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.preview-image.modern {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.preview-image.creative {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.preview-image.minimal {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.template-card h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.9rem;
    color: var(--white);
}

.template-card p {
    margin: 0 0 0.8rem 0;
    font-size: 0.7rem;
    color: rgba(17, 24, 39, 0.6);
}

.use-template-btn {
    width: 100%;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.use-template-btn:hover {
    background: var(--accent);
    color: white;
}

/* Template Library */
.template-shell {
    gap: 1.2rem;
}

.dash-top .back-link {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.template-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 24px;
    background: linear-gradient(140deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.template-hero h1 {
    margin: 0 0 0.4rem 0;
    font-size: 1.8rem;
    color: var(--white);
}

.template-hero p {
    margin: 0 0 1rem 0;
    color: rgba(17, 24, 39, 0.7);
}

.template-meta {
    display: flex;
    gap: 1.5rem;
}

.template-meta div {
    display: flex;
    flex-direction: column;
    color: rgba(17, 24, 39, 0.7);
}

.template-meta strong {
    font-size: 1.4rem;
    color: var(--white);
}

.template-meta span {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.template-filters {
    background: rgba(16, 185, 129, 0.06);
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.filter-chip {
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.template-gallery {
    margin-bottom: 1rem;
}

.template-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.template-tags span {
    background: rgba(17, 24, 39, 0.08);
    color: rgba(17, 24, 39, 0.7);
    border-radius: 10px;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-image.tech {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.template-cta {
    text-align: center;
    padding: 1.8rem;
    border-radius: 24px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(16, 185, 129, 0.3);
}

.template-cta h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1.3rem;
    color: var(--white);
}

.template-cta p {
    margin: 0 0 1rem 0;
    color: rgba(17, 24, 39, 0.7);
}

/* Create Portfolio */
.create-shell {
    gap: 1.2rem;
}

.build-steps {
    background: rgba(16, 185, 129, 0.08);
    border-radius: 20px;
    padding: 1.2rem;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.step-track {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: rgba(17, 24, 39, 0.5);
}

.step-item span {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    font-weight: 600;
}

.step-item.active {
    color: var(--white);
}

.step-item.active span {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.upload-zone {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    padding: 1.4rem;
    border-radius: 24px;
    background: white;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.secondary-btn {
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 16px;
    padding: 0.8rem 1.1rem;
    background: transparent;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
}

.drop-area {
    border: 2px dashed rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    color: rgba(17, 24, 39, 0.6);
}

.drop-area span {
    font-size: 2rem;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 20px;
    padding: 1.4rem;
}

.create-form textarea {
    border: none;
    border-radius: 16px;
    min-height: 90px;
    padding: 0.9rem 1.1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: var(--white);
}

.create-form textarea:focus {
    outline: 2px solid rgba(16, 185, 129, 0.3);
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.12);
}

.preview-card {
    border-radius: 24px;
    padding: 1.5rem;
    background: white;
    border: 1px solid rgba(16, 185, 129, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-head p {
    margin: 0;
    color: rgba(17, 24, 39, 0.5);
    font-size: 0.8rem;
}

.preview-body ul {
    padding-left: 1.2rem;
    color: rgba(17, 24, 39, 0.8);
}

.link-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 600;
}

.create-footer {
    text-align: center;
    padding: 1.5rem 1rem 0;
}

.create-footer p {
    color: rgba(17, 24, 39, 0.6);
    margin-bottom: 0.9rem;
}

/* Mobile Responsive Styles */
@media (max-width: 480px) {
    .dashboard-shell {
        width: 100% !important;
        max-width: none !important;
        padding: 1rem !important;
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
    }

    .dashboard-bg {
        padding: 0;
        justify-content: flex-start;
    }

    .dash-stats {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .templates-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    /* Dashboard-only override: show exactly two templates and hide the Minimal card */
    .portfolio-templates .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-templates .template-card:nth-child(3) {
        display: none;
    }

    .subscription-level {
        padding: 1rem;
    }

    .level-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dash-url {
        flex-direction: column;
        gap: 1rem;
    }

    .dash-url button {
        width: 100%;
    }

    .dash-top {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .bell-btn {
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    .dashboard-shell {
        width: 100% !important;
        max-width: none !important;
        padding: 1.2rem !important;
    }

    .templates-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

/* Subscription Plan Page Styles */
.current-plan {
    margin-bottom: 2rem;
}

.plan-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: all 0.3s ease;
}

.plan-card.current {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.04));
    border-color: rgba(16, 185, 129, 0.2);
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plan-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--white);
    font-weight: 600;
}

.plan-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent);
}

.plan-badge.premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.plan-badge:not(.active):not(.premium) {
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.6);
}

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: 1.5rem;
}

.currency {
    font-size: 1.2rem;
    color: rgba(15, 23, 42, 0.7);
}

.amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
}

.period {
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.6);
}

.plan-features {
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: rgba(15, 23, 42, 0.8);
}

.feature-item span:first-child {
    color: var(--accent);
    font-weight: 600;
    width: 16px;
}

.plan-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.plan-footer p {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(15, 23, 42, 0.6);
}

.plans-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plan-btn {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-btn.upgrade {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: white;
}

.plan-btn.upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.plan-btn.downgrade {
    background: rgba(15, 23, 42, 0.08);
    color: rgba(15, 23, 42, 0.7);
}

.plan-btn.downgrade:hover {
    background: rgba(15, 23, 42, 0.12);
}