/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all 0.3s;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container,
.notifications-container,
.profile-container {
    position: relative;
}

.search-btn,
.notifications-btn,
.profile-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    transition: background 0.2s;
}

.search-btn:hover,
.notifications-btn:hover,
.profile-btn:hover {
    background: var(--gray-100);
}

.notifications-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

.search-dropdown,
.notifications-dropdown,
.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 320px;
    padding: 1rem;
    z-index: 50;
}

.search-dropdown.active,
.notifications-dropdown.active,
.profile-dropdown.active {
    display: block;
}

.search-dropdown input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
}

.notifications-dropdown h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.notification-item {
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item p {
    font-size: 0.875rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.profile-dropdown {
    min-width: 192px;
    padding: 0.5rem 0;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--gray-900);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item.logout {
    color: #dc2626;
}

.profile-dropdown hr {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--gray-200);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.profile-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Container */
.container {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
    width: 256px;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    position: fixed;
    left: 0;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 40;
}

.sidebar-nav {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.nav-item svg {
    flex-shrink: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 256px;
    padding: 1.5rem;
    transition: margin-left 0.3s;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray-600);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stat-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-icon-blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon-green {
    background: #d1fae5;
    color: #059669;
}

.stat-icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* News List */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
}

.news-content h3 {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.news-content p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.news-time {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* Tasks List */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.task-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.task-info h3 {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.task-info p {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.task-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.task-badge-yellow {
    background: #fef3c7;
    color: #92400e;
}

.task-badge-blue {
    background: #dbeafe;
    color: #1e40af;
}

.task-badge-green {
    background: #d1fae5;
    color: #065f46;
}

/* Meetings List */
.meetings-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meeting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.meeting-item h3 {
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.meeting-item p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.meeting-location {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.meeting-item svg {
    color: var(--gray-400);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.sidebar-overlay.active {
    display: block;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group select[multiple] {
    padding: 0.5rem;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
}

@media (max-width: 640px) {
    .header-content {
        padding: 1rem;
    }

    .profile-name {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1rem;
    }

    .modal {
        max-width: 100%;
        margin: 0;
    }
}
