:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --sidebar-width: 280px;
    --right-sidebar-width: 320px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #f1f5f9;
    color: var(--dark);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
}

.nav-brand {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    font-size: 1.25rem;
    margin-right: 2rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.user-menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    cursor: pointer;
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 200px;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 101;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown ul {
    list-style: none;
    padding: 0.5rem 0;
}

.user-dropdown li {
    padding: 0;
}

.user-dropdown li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: background-color 0.2s;
}

.user-dropdown li a:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.user-dropdown li a i {
    margin-right: 0.75rem;
    color: var(--gray);
    width: 16px;
    text-align: center;
}

.user-dropdown li a:hover i {
    color: var(--primary);
}

/* Left Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid #e2e8f0;
    padding: 1rem 0;
    overflow-y: auto;
    position: fixed;
    top: 60px;
    bottom: 0;
}

.sidebar-header {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.section-list {
    list-style: none;
}

.section-item {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
}

.section-item:hover {
    background: #f1f5f9;
}

.section-item.active {
    background: #e0f2fe;
    border-left: 3px solid var(--primary);
}

.section-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #e0f2fe;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.section-item-content {
    flex: 1;
    min-width: 0;
}

.section-item-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Remove underlines from sidebar links */
.section-item .section-item-title,
.section-item a {
    text-decoration: none;
}

.section-item .section-header a {
    text-decoration: none;
    color: var(--dark);
    display: flex;
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    margin-top: 60px;
    margin-left: var(--sidebar-width);
    margin-right: var(--right-sidebar-width);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.content-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Right Sidebar */
.right-sidebar {
    width: var(--right-sidebar-width);
    background: white;
    border-left: 1px solid #e2e8f0;
    padding: 1rem 0;
    overflow-y: auto;
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
}

.right-sidebar-header {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.right-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

/* Team Table Styles */
.team-table {
    width: 100%;
    border-collapse: collapse;
}

.team-table th, .team-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.team-table th {
    font-weight: 600;
    color: var(--gray);
}

.team-member {
    display: flex;
    align-items: center;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: 500;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
}

.member-email {
    font-size: 0.875rem;
    color: var(--gray);
}

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

.badge-admin {
    background: #fce7f3;
    color: #9d174d;
}

.badge-member {
    background: #e0f2fe;
    color: #0369a1;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

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

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

.btn-outline {
    background-color: transparent;
    border-color: #e2e8f0;
    color: var(--dark);
}

.btn-outline:hover {
    background-color: #f8fafc;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    width: 500px;
    max-width: 100%;
    padding: 1.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

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

/* Responsive */
@media (max-width: 1200px) {
    .right-sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-right: 280px;
    }
}

@media (max-width: 992px) {
    .right-sidebar {
        display: none;
    }
    
    .main-content {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 120px;
    }
    
    .nav-links {
        display: none;
    }
}