/* ==========================================================================
   DASHBOARD.CSS — Dedicated Workspace Management Interface
   ========================================================================== */

/* --- CSS Variables (normally in base.css) --- */
:root {
    --primary-purple:    #7c3aed;
    --primary-glow:      #a78bfa;
    --border-purple:     rgba(124, 58, 237, 0.2);
    --text-slate:        #94a3b8;
    --radius-premium:    16px;
    --radius-base:       10px;
    --fluid-transition:  all 0.22s ease;
}

/* --- Base Reset & Typography --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: #0a0614;
    color: #f1f5f9;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* --- Subscription Badge --- */
.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.subscription-badge.no-plan {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.subscription-badge.no-plan a {
    color: #a78bfa;
    text-decoration: underline;
}

/* --- Card Title Row (lock badge layout) --- */
.card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.card-title-row h2 {
    margin-bottom: 0 !important;
}

/* --- Lock Badge --- */
.lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

/* --- Locked Card State --- */
.locked-card {
    opacity: 0.55;
    pointer-events: none;
}

.btn-locked {
    background: #3b3553 !important;
    color: #7c6fa0 !important;
    cursor: not-allowed;
}

/* --- Settings Panel --- */
.settings-panel {
    background: rgba(15, 10, 29, 0.6);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-premium);
    padding: 32px;
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

.settings-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #fff;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.settings-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-base);
    padding: 24px;
}

.settings-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}

.settings-card p {
    font-size: 0.85rem;
    color: var(--text-slate);
    line-height: 1.5;
    margin-bottom: 16px;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-select,
.settings-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-base);
    color: #f1f5f9;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 10px 14px;
    width: 100%;
    outline: none;
    transition: var(--fluid-transition);
    -webkit-appearance: none;
    appearance: none;
}

.settings-select:focus,
.settings-input:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.settings-select option {
    background: #1a0f35;
}

.settings-input::placeholder {
    color: #4b5563;
}

.settings-save-btn {
    padding: 10px 18px !important;
    font-size: 0.85rem !important;
}

.settings-note {
    font-size: 0.8rem;
    margin-top: 8px;
    display: block;
}

/* --- Auth Overlay (locked modal) --- */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 2, 15, 0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-overlay.hidden {
    display: none;
}

.auth-modal-card {
    background: #100a24;
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-premium);
    padding: 40px 36px;
    max-width: 420px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.auth-close-x {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: var(--text-slate);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}
.auth-close-x:hover { color: #fff; }

.auth-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.auth-modal-header p {
    color: var(--text-slate);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.btn {
    display: inline-block;
    padding: 13px 24px;
    border-radius: var(--radius-base);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--fluid-transition);
    cursor: pointer;
    font-family: inherit;
    border: none;
}

.btn-primary {
    background: var(--primary-purple);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-glow); }

.btn-block { display: block; width: 100%; text-align: center; }

.auth-note {
    font-size: 0.78rem;
    color: #4b5563;
    line-height: 1.5;
}

/* --- User Profile Nav --- */
.user-profile-nav-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Responsive Settings --- */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .settings-panel {
        padding: 24px 20px;
    }
    .action-card-box {
        padding: 24px 20px;
    }
}

/* Ambient Dark Grid Background */
body {
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(35, 24, 61, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(35, 24, 61, 0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* --- Top Header Navbar --- */
.dash-navbar {
    position: relative;
    z-index: 10;
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-box {
    background: var(--primary-purple);
    color: #fff;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.logo-text {
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

/* --- Layout Frame Containers --- */
.dash-container {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 60px auto 100px auto;
    padding: 0 20px;
}

.welcome-hero-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 48px;
}

.welcome-hero-banner img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--primary-purple);
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.35);
    object-fit: cover;
}

.welcome-hero-banner h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.welcome-hero-banner h1 span {
    background: linear-gradient(135deg, var(--primary-glow) 0%, #f472b6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Dashboard Grid Core Matrix --- */
.dashboard-grid-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.action-card-box {
    background: rgba(15, 10, 29, 0.6);
    border: 1px solid var(--border-purple);
    border-radius: var(--radius-premium);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    backdrop-filter: blur(12px);
    transition: var(--fluid-transition);
}

.action-card-box:hover {
    transform: translateY(-2px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.08);
}

.card-meta-info {
    margin-bottom: 24px;
}

.card-meta-info h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.card-meta-info p {
    color: var(--text-slate);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Control UI Buttons --- */
.action-trigger-link {
    width: 100%;
    text-align: center;
    background: var(--primary-purple);
    color: #fff;
    padding: 14px 24px;
    border-radius: var(--radius-base);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--fluid-transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.action-trigger-link:hover {
    background: var(--primary-glow);
}

/* --- Utility Footer Row Settings --- */
.utility-footer-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-purple);
}
.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.dash-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-purple);
    color: #fff;
}
.dash-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-purple);
}

.danger-btn {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
}
.danger-btn:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

.dash-btn-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.dash-btn-danger:hover {
    background: #ef4444;
    color: #fff;
    border-color: #dc2626;
}

/* --- Responsive Adaptability Breakpoints --- */
@media (max-width: 768px) {
    .dashboard-grid-matrix,
    .utility-footer-controls {
        grid-template-columns: 1fr;
    }
    .dash-container {
        margin: 30px auto;
    }
    .welcome-hero-banner h1 {
        font-size: 1.8rem;
    }
}
