/* Modern, Professional CSS for Interactive Project Management System */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    /* Restore original brand gradient */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.login-form h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    /* Gradient text like before (keeps the brand look) */
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-subtitle {
    text-align: center;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    color: #64748b;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.error-message {
    display: none; /* hidden until there is an error */
    color: #475569;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Login caption (subtext under the form) */
.login-caption {
    max-width: 420px;           /* Align with the form width */
    width: 100%;
    margin: 1.25rem auto 0;     /* Centered below the form */
    text-align: center;
    color: #334155;             /* Stronger contrast */
    font-size: 1rem;            /* Slightly larger for readability */
    line-height: 1.55;          /* Comfortable reading */
    background: rgba(255, 255, 255, 0.92); /* Subtle panel for contrast over gradient */
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); /* Soft depth */
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.left-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Brand stack: title with subscription info below (upper-left) */
.header .brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-list a {
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-list a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
.subscription-info {
    color: #e2e8f0;
    font-size: 0.9rem;
    /* Moved under the title at upper-left */
    margin: 0.25rem 0 0 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Container */
.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 2rem;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    display: none;
}

.sidebar.active {
    display: block;
}

.sidebar h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #e2e8f0;
}

.project-list {
    list-style: none;
    margin-bottom: 2rem;
}

.project-list li {
    padding: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}

.project-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1e293b;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card p {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Timeline */
.timeline-container {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 800px;
}

.stage {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 6px solid #667eea;
    transition: all 0.3s ease;
}

.stage:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.stage h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

/* Blocks */
.blocks-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.block {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    cursor: move;
    min-width: 150px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    color: #64748b;
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-bottom: 1rem;
}

.close:hover {
    color: #1e293b;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

label {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

input, textarea {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        flex-direction: column;
        width: 200px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        padding: 1rem 0;
        z-index: 101;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list a {
        display: block;
        padding: 0.75rem 1rem;
        text-align: left;
    }

    .menu-toggle {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        padding: 1rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .timeline {
        min-width: auto;
    }

    .modal-content {
        margin: 5% auto;
        padding: 2rem;
    }
}

@media (min-width: 769px) {
    .sidebar {
        display: block;
        position: static;
        transform: none;
    }

    .menu-toggle {
        display: none;
    }

    .nav-list {
        display: flex;
    }
}

@media (min-width: 1024px) {
    /* Make the app use the full available width on large screens to remove side gutters */
    .container {
        max-width: 100%;
        margin: 0;
        width: 100%;
    }

    .main-content {
        /* Slightly reduce padding so content feels wider without huge gutters */
        padding: 2rem 2.5rem;
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* ---- Login (modernized layout and components) ---- */
.login-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 40px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}
.login-hero {
    color: #eef2ff;
    user-select: none;
}
.login-hero .brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.login-hero .logo {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.login-hero .logo svg { filter: drop-shadow(0 6px 16px rgba(0,0,0,0.18)); }
.login-hero h1 {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: 0.2px;
    color: #fff;
}
.login-hero .tagline {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
}
.login-hero .features {
    list-style: none;
    margin-top: 8px;
    display: grid;
    gap: 6px;
    color: rgba(255,255,255,0.95);
}
.login-hero .features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.login-hero .features li::before {
    content: '✓';
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    color: #0f172a;
    background: #bbf7d0;
    font-size: 0.75rem;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form.modern {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    padding: 2.25rem 2rem;
    border-radius: 18px;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 24px 48px rgba(2,6,23,0.18);
}

.login-form.modern h2 {
    text-align: left;
    margin-bottom: 0.4rem;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, #111827, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-form.modern .login-subtitle {
    margin-bottom: 1.25rem;
    color: #64748b;
    font-size: 0.95rem;
}

/* Input with leading icon and trailing action */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    transition: all 0.2s ease;
}
.input-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.input-icon {
    position: absolute;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    pointer-events: none;
}
.login-form.modern .form-group input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.9rem 3rem 0.9rem 40px;
    font-size: 1rem;
    color: #0f172a;
}
.login-form.modern .form-group input::placeholder { color: #94a3b8; }

.toggle-pass {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.toggle-pass:hover { background: #f1f5f9; color: #334155; }

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -6px;
}
.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 0.9rem;
}
.remember input { accent-color: #6366f1; }
.forgot {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.forgot:hover { text-decoration: underline; }

/* Button loading state */
.btn { position: relative; }
.btn.loading { opacity: 0.95; cursor: wait; }
.btn.loading .btn-label { opacity: 0.9; }
.btn.loading::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.6);
    border-top-color: #fff;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-footer {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
}

/* Refine error message contrast on light panel */
.login-form .error-message {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

/* Responsive */
@media (max-width: 860px) {
    .login-layout {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 12px;
    }
    .login-hero { text-align: center; }
    .login-hero .brand { align-items: center; }
    .login-hero .logo { margin: 0 auto; }
}