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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 10px;
}

.login-header p {
    color: #999;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #333;
}

.btn-outline:hover {
    background: #f5f7fa;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}

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

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.menu {
    list-style: none;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.menu-item:hover {
    background: #34495e;
}

.menu-item.active {
    background: #667eea;
}

.menu-item .icon {
    font-size: 18px;
}

.menu-group {
    list-style: none;
}

.menu-group-title {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    color: #b8c7ce;
}

.menu-group-title:hover {
    background: #34495e;
}

.menu-group-title .arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s;
}

.menu-group.expanded .menu-group-title .arrow {
    transform: rotate(180deg);
}

.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #1e2a38;
}

.menu-group.expanded .submenu {
    max-height: 500px;
}

.submenu-item {
    padding: 12px 20px 12px 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    color: #b8c7ce;
    font-size: 14px;
}

.submenu-item:hover {
    background: #34495e;
    color: #fff;
}

.submenu-item.active {
    background: #667eea;
    color: #fff;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    background: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left h3 {
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.card-value {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

.card-trend {
    font-size: 12px;
    margin-top: 5px;
}

.card-trend.up {
    color: #52c41a;
}

.card-trend.down {
    color: #f5222d;
}

.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

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

.table-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

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

th, td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 14px;
    color: #666;
}

td {
    font-size: 14px;
}

tr:hover {
    background: #f8f9fa;
}

.pagination {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.pagination button {
    padding: 5px 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 3px;
    cursor: pointer;
}

.pagination button:hover {
    background: #f5f7fa;
}

.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-success {
    background: #52c41a;
    color: white;
}

.btn-success:hover {
    background: #45a916;
}

.btn-danger {
    background: #f5222d;
    color: white;
}

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

.btn-warning {
    background: #faad14;
    color: white;
}

.btn-warning:hover {
    background: #d48806;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.status-success {
    background: #f6ffed;
    color: #52c41a;
}

.status-warning {
    background: #fffbe6;
    color: #faad14;
}

.status-error {
    background: #fff1f0;
    color: #f5222d;
}

.status-info {
    background: #e6f7ff;
    color: #1890ff;
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        height: 100%;
        z-index: 100;
        transition: left 0.3s;
    }

    .sidebar.active {
        left: 0;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }
}