/* d:\xampp\htdocs\slr\style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #0a0b10;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.3);
    --secondary: #06b6d4;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --accent-red: #ef4444;
    --accent-green: #10b981;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Abstract Background Shapes */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
}

@keyframes float {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

aside {
    width: 280px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Components */
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.nav-links {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: var(--card-bg);
    color: var(--text-main);
}

.nav-link.active {
    border-left: 3px solid var(--primary);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 0.5rem;
}

.card-header h3 {
    margin: 0;
}

.collapse-icon {
    transition: var(--transition);
    color: var(--text-dim);
}

.collapsed .card-content {
    display: none;
}

.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.collapsed.card {
    padding-bottom: 1.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.btn-xs {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 6px;
    gap: 0.3rem;
}

.btn-xs i {
    width: 14px;
    height: 14px;
}

.btn-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-circle i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-translate {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    margin-top: 8px;
    opacity: 0.7;
    transition: var(--transition);
}

.btn-translate:hover {
    opacity: 1;
    text-decoration: underline;
}

.btn-translate i {
    width: 12px;
    height: 12px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 220px;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--theme-color-alpha) 0%, transparent 100%);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--theme-color);
    box-shadow: 0 15px 30px var(--theme-glow);
}

/* Themes */
.theme-purple { 
    --theme-color: #a855f7; 
    --theme-color-alpha: rgba(168, 85, 247, 0.1); 
    --theme-glow: rgba(168, 85, 247, 0.2);
    border-top-color: #a855f7;
}
.theme-emerald { 
    --theme-color: #10b981; 
    --theme-color-alpha: rgba(16, 185, 129, 0.1); 
    --theme-glow: rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
}
.theme-blue { 
    --theme-color: #3b82f6; 
    --theme-color-alpha: rgba(59, 130, 246, 0.1); 
    --theme-glow: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
}
.theme-amber { 
    --theme-color: #f59e0b; 
    --theme-color-alpha: rgba(245, 158, 11, 0.1); 
    --theme-glow: rgba(245, 158, 11, 0.2);
    border-top-color: #f59e0b;
}

.project-card .btn-primary {
    background: var(--theme-color);
    box-shadow: 0 4px 12px var(--theme-color-alpha);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.project-meta {
    font-size: 0.875rem;
    color: var(--text-dim);
    position: relative;
    z-index: 1;
}

.chart-card {
    height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.project-overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.modal {
    background: #161821;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 500px;
    border-radius: 24px;
    padding: 2rem;
    position: relative;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-size: 0.875rem;
}

input, textarea, select {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.06);
}

select option {
    background-color: #161821;
    color: var(--text-main);
    padding: 10px;
}

/* Utils */
.hidden { display: none !important; }
.spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* PRISMA Chart */
.prisma-container {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prisma-step {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.prisma-box {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    font-weight: 600;
}

.prisma-arrow {
    padding: 1rem;
    color: var(--primary);
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.markdown-body p {
    margin-bottom: 1rem;
}

.markdown-body ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Workflow Section */
.workflow-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.workflow-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem; /* Tighter gaps */
    flex-wrap: nowrap; /* Force one line */
    padding: 1rem 0;
}

.workflow-step {
    flex: 1;
    min-width: 100px; /* Reduced width */
    padding: 1rem 0.5rem; /* Compact padding */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Connecting Arrows (Desktop) */
.workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 35%;
    right: -0.5rem;
    width: 0.5rem;
    height: 1px;
    background: var(--primary);
    opacity: 0.2;
}

.workflow-step:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.1);
}

.step-icon {
    width: 38px; /* Smaller icons */
    height: 38px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.workflow-step:hover .step-icon {
    transform: rotate(5deg);
    color: #fff;
    background: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.step-num {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
}

.step-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.3;
}

@media (max-width: 1024px) {
    .workflow-steps {
        flex-wrap: wrap;
        justify-content: center;
    }
    .workflow-step:not(:last-child)::after {
        display: none;
    }
}

/* Authentication Overlay */
.auth-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.auth-section.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.login-header i {
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.btn-delete-project {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.btn-delete-project:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.btn-delete-project i {
    width: 18px;
    height: 18px;
}

.btn-edit-project {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.btn-edit-project:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
}

.btn-edit-project i {
    width: 18px;
    height: 18px;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.5;
}

.btn-icon:hover {
    background: var(--primary-glow);
    opacity: 1;
}

.btn-icon i {
    width: 18px;
    height: 18px;
}

.badge-count {
    background: var(--accent-red);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.admin-only.hidden {
    display: none !important;
}
