* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 0;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 180px;
    height: auto;
    margin-right: 20px;
}

.nav-menu {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-btn {
    background-color: transparent;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover, .nav-btn.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
}

h1, h2, h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2563eb;
    text-align: center;
}

h2 {
    font-size: 22px;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #374151;
}

.section-description {
    color: #6b7280;
    margin-bottom: 20px;
}

.profile-section {
    margin-bottom: 40px;
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.profile-details {
    margin-bottom: 30px;
}

.profile-detail-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    width: 40%;
    color: #4b5563;
}

.detail-value {
    width: 60%;
}

.password-change-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input.error {
    border-color: #dc2626;
}

.primary-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.primary-btn:hover {
    background-color: #1d4ed8;
}

.primary-btn:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.success-message {
    background-color: #dcfce7;
    color: #166534;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message {
    background-color: #fee2e2;
    color: #b91c1c;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

/* Admin tabs */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.admin-tab {
    padding: 12px 24px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s;
}

.admin-tab:hover {
    color: #2563eb;
}

.admin-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-full {
    grid-column: 1 / -1;
}

/* Permission group */
.permission-group {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.permission-checkboxes {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.permission-checkboxes label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
}

.permission-checkboxes input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* User list */
.user-list {
    max-height: 600px;
    overflow-y: auto;
}

.user-item {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s;
}

.user-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.user-name {
    font-size: 18px;
    font-weight: bold;
    color: #1a1a1a;
}

.user-email {
    color: #6b7280;
    font-size: 14px;
}

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

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-edit {
    background-color: #2563eb;
    color: white;
}

.btn-edit:hover {
    background-color: #1d4ed8;
}

.btn-delete {
    background-color: #dc2626;
    color: white;
}

.btn-delete:hover {
    background-color: #b91c1c;
}

.user-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.user-detail {
    font-size: 14px;
}

.user-detail strong {
    color: #4b5563;
}

.user-permissions-display {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.perm-badge {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Filter section */
.filter-section {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group label {
    font-weight: bold;
    color: #374151;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
    background-color: white;
}

.filter-group select:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    margin: 0;
    color: #1a1a1a;
    border: none;
    padding: 0;
}

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

.close-modal:hover {
    color: #1a1a1a;
}

.secondary-btn {
    background-color: #6b7280;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.secondary-btn:hover {
    background-color: #4b5563;
}

.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .user-details {
        grid-template-columns: 1fr;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tab {
        width: 100%;
        text-align: left;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group select {
        width: 100%;
    }

    .profile-detail-item {
        flex-direction: column;
    }
    
    .detail-label, .detail-value {
        width: 100%;
    }
    
    .detail-label {
        margin-bottom: 5px;
    }

    .user-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .user-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}