:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --bg-app: #f8fafc;
    --bg-sidebar: #0f172a;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-sidebar: #94a3b8;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    overflow: hidden;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
.card-title {
    font-family: 'Outfit', sans-serif;
    color: #0f172a;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    z-index: 50;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.05);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2.5rem;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.2s;
}

.brand:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand h2 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.brand h2 span {
    display: block;
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.user-identity {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 2rem;
}

nav button {
    background: none;
    border: none;
    color: var(--text-sidebar);
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

nav button:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(4px);
}

nav button.active {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    position: relative;
}

/* Global View Styling */
.view {
    padding: 2.5rem;
    max-width: 1400px;
    /* Increased max-width */
    margin: 0 auto;
    animation: slideUp 0.4s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login View - Modern Split-Screen */
.login-view {
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 0;
    background: white;
}

.login-split {
    display: flex;
    width: 100%;
    height: 100%;
}

.login-visual {
    flex: 1.2;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 4rem;
    position: relative;
    overflow: hidden;
}

.login-visual::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.1) 0%, transparent 60%);
    top: -50%;
    left: -50%;
}

.visual-content {
    max-width: 500px;
    position: relative;
    z-index: 1;
}

.visual-logo-container {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.07);
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

.main-logo {
    width: 200px;
    height: 200px;
    /* object-fit: contain; */
}

.visual-content h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.benefit-list {
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.benefit-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: #94a3b8;
}

.benefit-list li span {
    width: 32px;
    height: 32px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: bold;
}

.login-form-side {
    flex: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 4rem;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 3.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.login-header {
    text-align: left;
    /* Changed to left */
    margin-bottom: 3rem;
}

.login-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--primary-light);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin: 0 auto 1.5rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.login-form .form-group label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.login-form input {
    padding: 0.85rem 1rem;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    border-radius: 12px;
}

.login-form input:focus {
    border-color: var(--primary);
    background: #fff;
}

.btn-login {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
}

.login-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Dashboard Hero Expansion */
.dashboard-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 4rem 2.5rem;
    margin: -2.5rem -2.5rem 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-content h1 {
    color: white;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.hero-content h1 span {
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: #94a3b8;
    font-size: 1.1rem;
    max-width: 600px;
}

/* Stats Cards */
.horizontal-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::after {
    opacity: 1;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.card-meta {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Containers */
.form-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.form-section h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #fcfdfe;
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--text-sidebar);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: #475569;
    border: 1.5px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background: #fff;
    color: var(--danger);
    border: 1.5px solid #fee2e2;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

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

/* Badges */
.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid transparent;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: #f1f5f9;
    color: var(--primary);
}

/* Badges */
.badge-role {
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.badge-stack {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    text-align: left;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

.hover-row:hover {
    background-color: #f8fafc;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.hidden {
    display: none !important;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
}

.form-actions-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 1rem;
        align-items: center;
    }

    .brand h2,
    .user-identity,
    nav button span {
        display: none;
    }

    nav button {
        padding: 0.75rem;
        justify-content: center;
    }
}

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2000;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast.success {
    border-left-color: var(--success);
}

.notification-toast.error {
    border-left-color: var(--danger);
}

.notification-toast.warning {
    border-left-color: var(--warning);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-message {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}