:root {
    --primary: #6B2D5B;
    --primary-dark: #4A1E3E;
    --primary-light: #8B3D7B;
    --secondary: #B83280;
    --accent: #D946EF;
    --sidebar-bg: #2D1F3D;
    --sidebar-hover: #3D2F4D;
    --text-light: #F8F9FA;
    --text-dark: #212529;
    --bg-light: #F5F7FA;
    --white: #FFFFFF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--sidebar-bg) 100%);
}

.login-box {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
}

.login-box h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.login-box p {
    color: #6B7280;
    margin-bottom: 2rem;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--text-light);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-logo-img {
    height: 36px;
    width: auto;
}

.sidebar-user {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.user-info span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: capitalize;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--text-light);
}

.nav-item.active {
    background: var(--sidebar-hover);
    color: var(--text-light);
    border-left-color: var(--secondary);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.nav-submenu {
    display: flex;
    flex-direction: column;
}

.nav-submenu-toggle {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    justify-content: flex-start;
}

.nav-submenu-toggle .chevron {
    margin-left: auto;
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.nav-submenu.open .nav-submenu-toggle .chevron {
    transform: rotate(180deg);
}

.nav-submenu-items {
    display: none;
    flex-direction: column;
}

.nav-submenu.open .nav-submenu-items {
    display: flex;
}

.nav-subitem {
    padding-left: 3.25rem !important;
    font-size: 0.9rem;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

.top-bar {
    background: var(--white);
    padding: 1rem 2rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.content-area {
    padding: 2rem;
}

.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.purple { background: rgba(107, 45, 91, 0.1); color: var(--primary); }
.stat-icon.pink { background: rgba(184, 50, 128, 0.1); color: var(--secondary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--info); }

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.stat-content p {
    font-size: 0.875rem;
    color: #6B7280;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary);
}

.btn-secondary {
    background: #E5E7EB;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #D1D5DB;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

th {
    font-weight: 600;
    color: #6B7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #F9FAFB;
}

td {
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.badge-purple { background: rgba(107, 45, 91, 0.1); color: var(--primary); }

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(184, 50, 128, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

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

.project-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.project-card-header {
    background: var(--sidebar-bg);
    padding: 1rem 1.25rem;
    color: var(--text-light);
}

.project-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-card-header a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-decoration: none;
}

.project-card-header a:hover {
    color: var(--text-light);
}

.project-card-body {
    padding: 1.25rem;
}

.project-meta {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.project-meta dt {
    color: #6B7280;
    font-weight: 500;
}

.project-meta dd {
    color: var(--text-dark);
}

.project-card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: #111;
}

.modal-body {
    padding: 24px;
}
